Zend\Mvc\Controller\AbstractController
Abstract controller
Convenience methods for pre-built plugins (@see __call):
Synopsis
class AbstractController
implements
DispatchableInterface,EventManagerAwareInterface,InjectApplicationEventInterface,ServiceLocatorAwareInterface
{
- // members
- protected PluginManager $plugins;
- protected RequestInterface $request;
- protected ResponseInterface $response;
- protected EventInterface $event;
- protected EventManagerInterface $events;
- protected ServiceLocatorInterface $serviceLocator;
- protected string $eventIdentifier;
- // methods
- public abstract mixed onDispatch()
- public Response|mixed dispatch()
- public RequestInterface getRequest()
- public ResponseInterface getResponse()
- public AbstractController setEventManager()
- public EventManagerInterface getEventManager()
- public void setEvent()
- public MvcEvent getEvent()
- public void setServiceLocator()
- public ServiceLocatorInterface getServiceLocator()
- public PluginManager getPluginManager()
- public AbstractController setPluginManager()
- public mixed plugin()
- public mixed __call()
- protected void attachDefaultListeners()
- public static string getMethodFromAction()
Hierarchy
Extended by
- Zend\Mvc\Controller\AbstractActionController
- Zend\Mvc\Controller\AbstractRestfulController
- Zend\Mvc\Controller\AbstractConsoleController
Implements
Members
protected
- $event — Zend\EventManager\EventInterface
- $eventIdentifier — string
- $events — Zend\EventManager\EventManagerInterface
- $plugins — Zend\Mvc\Controller\PluginManager
- $request — Zend\Stdlib\RequestInterface
- $response — Zend\Stdlib\ResponseInterface
- $serviceLocator — Zend\ServiceManager\ServiceLocatorInterface
Methods
protected
- attachDefaultListeners() — Register the default events for this controller
public
- __call() — Method overloading: return/call plugins
- dispatch() — Dispatch a request
- getEvent() — Get the attached event
- getEventManager() — Retrieve the event manager
- getMethodFromAction() — Transform an "action" token into a method name
- getPluginManager() — Get plugin manager
- getRequest() — Get request object
- getResponse() — Get response object
- getServiceLocator() — Retrieve serviceManager instance
- onDispatch() — Execute the request
- plugin() — Get plugin instance
- setEvent() — Set an event to use during dispatch
- setEventManager() — Set the event manager instance used by this context
- setPluginManager() — Set plugin manager
- setServiceLocator() — Set serviceManager instance