PHP Class Zend\Mvc\Controller\AbstractController

Inheritance: implements Zend\Stdlib\DispatchableInterface, implements Zend\EventManager\EventManagerAwareInterface, implements Zend\Mvc\InjectApplicationEventInterface, implements Zend\ServiceManager\ServiceLocatorAwareInterface
Afficher le fichier Open project: zendframework/zend-mvc Class Usage Examples

Protected Properties

Свойство Type Description
$event Zend\EventManager\EventInterface
$eventIdentifier null | string | string[]
$events Zend\EventManager\EventManagerInterface
$plugins PluginManager
$request Zend\Stdlib\RequestInterface
$response Zend\Stdlib\ResponseInterface

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
attachDefaultListeners ( ) : void Register the default events for this controller

Method Details

__call() public méthode

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
Résultat mixed

attachDefaultListeners() protected méthode

Register the default events for this controller
protected attachDefaultListeners ( ) : void
Résultat void

dispatch() public méthode

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
Résultat Zend\Stdlib\ResponseInterface | mixed

getEvent() public méthode

Will create a new MvcEvent if none provided.
public getEvent ( ) : MvcEvent
Résultat Zend\Mvc\MvcEvent

getEventManager() public méthode

Lazy-loads an EventManager instance if none registered.
public getEventManager ( ) : Zend\EventManager\EventManagerInterface
Résultat Zend\EventManager\EventManagerInterface

getMethodFromAction() public static méthode

Transform an "action" token into a method name
public static getMethodFromAction ( string $action ) : string
$action string
Résultat string

getPluginManager() public méthode

Get plugin manager
public getPluginManager ( ) : PluginManager
Résultat PluginManager

getRequest() public méthode

Get request object
public getRequest ( ) : Zend\Stdlib\RequestInterface
Résultat Zend\Stdlib\RequestInterface

getResponse() public méthode

Get response object
public getResponse ( ) : Zend\Stdlib\ResponseInterface
Résultat Zend\Stdlib\ResponseInterface

onDispatch() abstract public méthode

Execute the request
abstract public onDispatch ( MvcEvent $e ) : mixed
$e Zend\Mvc\MvcEvent
Résultat mixed

plugin() public méthode

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)
Résultat mixed

setEvent() public méthode

By default, will re-cast to MvcEvent if another event type is provided.
public setEvent ( Zend\EventManager\EventInterface $e ) : void
$e Zend\EventManager\EventInterface
Résultat void

setEventManager() public méthode

Set the event manager instance used by this context
public setEventManager ( Zend\EventManager\EventManagerInterface $events ) : AbstractController
$events Zend\EventManager\EventManagerInterface
Résultat AbstractController

setPluginManager() public méthode

Set plugin manager
public setPluginManager ( PluginManager $plugins ) : AbstractController
$plugins PluginManager
Résultat AbstractController

Property Details

$event protected_oe property

protected EventInterface,Zend\EventManager $event
Résultat Zend\EventManager\EventInterface

$eventIdentifier protected_oe property

protected null|string|string[] $eventIdentifier
Résultat null | string | string[]

$events protected_oe property

protected EventManagerInterface,Zend\EventManager $events
Résultat Zend\EventManager\EventManagerInterface

$plugins protected_oe property

protected PluginManager,Zend\Mvc\Controller $plugins
Résultat PluginManager

$request protected_oe property

protected RequestInterface,Zend\Stdlib $request
Résultat Zend\Stdlib\RequestInterface

$response protected_oe property

protected ResponseInterface,Zend\Stdlib $response
Résultat Zend\Stdlib\ResponseInterface