PHP Класс Zend\Mvc\Controller\AbstractController

Наследование: implements Zend\Stdlib\DispatchableInterface, implements Zend\EventManager\EventManagerAwareInterface, implements Zend\Mvc\InjectApplicationEventInterface, implements Zend\ServiceManager\ServiceLocatorAwareInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$event Zend\EventManager\EventInterface
$eventIdentifier null | string | string[]
$events Zend\EventManager\EventManagerInterface
$plugins PluginManager
$request Zend\Stdlib\RequestInterface
$response Zend\Stdlib\ResponseInterface

Открытые методы

Метод Описание
__call ( string $method, array $params ) : mixed Method overloading: return/call plugins
dispatch ( Zend\Stdlib\RequestInterface $request, Zend\Stdlib\ResponseInterface $response = null ) : Zend\Stdlib\ResponseInterface | mixed Dispatch a request
getEvent ( ) : MvcEvent Get the attached event
getEventManager ( ) : Zend\EventManager\EventManagerInterface Retrieve the event manager
getMethodFromAction ( string $action ) : string Transform an "action" token into a method name
getPluginManager ( ) : PluginManager Get plugin manager
getRequest ( ) : Zend\Stdlib\RequestInterface Get request object
getResponse ( ) : Zend\Stdlib\ResponseInterface Get response object
onDispatch ( MvcEvent $e ) : mixed Execute the request
plugin ( string $name, array $options = null ) : mixed Get plugin instance
setEvent ( Zend\EventManager\EventInterface $e ) : void Set an event to use during dispatch
setEventManager ( Zend\EventManager\EventManagerInterface $events ) : AbstractController Set the event manager instance used by this context
setPluginManager ( PluginManager $plugins ) : AbstractController Set plugin manager

Защищенные методы

Метод Описание
attachDefaultListeners ( ) : void Register the default events for this controller

Описание методов

__call() публичный Метод

If the plugin is a functor, call it, passing the parameters provided. Otherwise, return the plugin instance.
public __call ( string $method, array $params ) : mixed
$method string
$params array
Результат mixed

attachDefaultListeners() защищенный Метод

Register the default events for this controller
protected attachDefaultListeners ( ) : void
Результат void

dispatch() публичный Метод

Dispatch a request
public dispatch ( Zend\Stdlib\RequestInterface $request, Zend\Stdlib\ResponseInterface $response = null ) : Zend\Stdlib\ResponseInterface | mixed
$request Zend\Stdlib\RequestInterface
$response Zend\Stdlib\ResponseInterface
Результат Zend\Stdlib\ResponseInterface | mixed

getEvent() публичный Метод

Will create a new MvcEvent if none provided.
public getEvent ( ) : MvcEvent
Результат Zend\Mvc\MvcEvent

getEventManager() публичный Метод

Lazy-loads an EventManager instance if none registered.
public getEventManager ( ) : Zend\EventManager\EventManagerInterface
Результат Zend\EventManager\EventManagerInterface

getMethodFromAction() публичный статический Метод

Transform an "action" token into a method name
public static getMethodFromAction ( string $action ) : string
$action string
Результат string

getPluginManager() публичный Метод

Get plugin manager
public getPluginManager ( ) : PluginManager
Результат PluginManager

getRequest() публичный Метод

Get request object
public getRequest ( ) : Zend\Stdlib\RequestInterface
Результат Zend\Stdlib\RequestInterface

getResponse() публичный Метод

Get response object
public getResponse ( ) : Zend\Stdlib\ResponseInterface
Результат Zend\Stdlib\ResponseInterface

onDispatch() абстрактный публичный Метод

Execute the request
abstract public onDispatch ( MvcEvent $e ) : mixed
$e Zend\Mvc\MvcEvent
Результат mixed

plugin() публичный Метод

Get plugin instance
public plugin ( string $name, array $options = null ) : mixed
$name string Name of plugin to return
$options array Options to pass to plugin constructor (if not already instantiated)
Результат mixed

setEvent() публичный Метод

By default, will re-cast to MvcEvent if another event type is provided.
public setEvent ( Zend\EventManager\EventInterface $e ) : void
$e Zend\EventManager\EventInterface
Результат void

setEventManager() публичный Метод

Set the event manager instance used by this context
public setEventManager ( Zend\EventManager\EventManagerInterface $events ) : AbstractController
$events Zend\EventManager\EventManagerInterface
Результат AbstractController

setPluginManager() публичный Метод

Set plugin manager
public setPluginManager ( PluginManager $plugins ) : AbstractController
$plugins PluginManager
Результат AbstractController

Описание свойств

$event защищенное свойство

protected EventInterface,Zend\EventManager $event
Результат Zend\EventManager\EventInterface

$eventIdentifier защищенное свойство

protected null|string|string[] $eventIdentifier
Результат null | string | string[]

$events защищенное свойство

protected EventManagerInterface,Zend\EventManager $events
Результат Zend\EventManager\EventManagerInterface

$plugins защищенное свойство

protected PluginManager,Zend\Mvc\Controller $plugins
Результат PluginManager

$request защищенное свойство

protected RequestInterface,Zend\Stdlib $request
Результат Zend\Stdlib\RequestInterface

$response защищенное свойство

protected ResponseInterface,Zend\Stdlib $response
Результат Zend\Stdlib\ResponseInterface