Convenience methods for pre-built plugins (@see __call):
Methods
Method overloading: return/call plugins
__call(string $method, array $params) : mixed
Inherited
If the plugin is a functor, call it, passing the parameters provided.
Otherwise, return the plugin instance.
inherited_from |
\Zend\Mvc\Controller\AbstractController::__call() |
Parameters
$method
string
$params
array
Returns
mixed
Dispatch a request
dispatch(\Zend\Stdlib\RequestInterface $request, \Zend\Stdlib\ResponseInterface $response) : \Zend\Stdlib\ResponseInterface | mixed
Inherited
events |
dispatch.pre, dispatch.post |
inherited_from |
\Zend\Mvc\Controller\AbstractController::dispatch() |
Parameters
Returns
Get the attached event
getEvent() : \Zend\Mvc\MvcEvent
Inherited
Will create a new MvcEvent if none provided.
inherited_from |
\Zend\Mvc\Controller\AbstractController::getEvent() |
Returns
Retrieve the event manager
getEventManager() : \Zend\EventManager\EventManagerInterface
Inherited
Lazy-loads an EventManager instance if none registered.
inherited_from |
\Zend\Mvc\Controller\AbstractController::getEventManager() |
Returns
Transform an "action" token into a method name
getMethodFromAction(string $action) : string
Inherited
inherited_from |
\Zend\Mvc\Controller\AbstractController::getMethodFromAction() |
Parameters
$action
string
Returns
string
Get request object
getRequest() : \Zend\Stdlib\RequestInterface
Inherited
inherited_from |
\Zend\Mvc\Controller\AbstractController::getRequest() |
Returns
Get response object
getResponse() : \Zend\Stdlib\ResponseInterface
Inherited
inherited_from |
\Zend\Mvc\Controller\AbstractController::getResponse() |
Returns
Default action if none provided
indexAction() : array
Action called if matched action does not exist
notFoundAction() : array
Execute the request
onDispatch(\Zend\Mvc\MvcEvent $e) : mixed
Parameters
Exceptions
Returns
mixed
Get plugin instance
plugin(string $name, array $options) : mixed
Inherited
inherited_from |
\Zend\Mvc\Controller\AbstractController::plugin() |
Parameters
$name
string
Name of plugin to return
$options
nullarray
Options to pass to plugin constructor (if not already instantiated)
Returns
mixed
Set an event to use during dispatch
setEvent(\Zend\EventManager\EventInterface $e) : void
Inherited
By default, will re-cast to MvcEvent if another event type is provided.
inherited_from |
\Zend\Mvc\Controller\AbstractController::setEvent() |
Parameters
Set the event manager instance used by this context
setEventManager(\Zend\EventManager\EventManagerInterface $events) : \Zend\Mvc\Controller\AbstractController
Inherited
inherited_from |
\Zend\Mvc\Controller\AbstractController::setEventManager() |
Parameters
Returns
Set plugin manager
setPluginManager(\Zend\Mvc\Controller\PluginManager $plugins) : \Zend\Mvc\Controller\AbstractController
Inherited
inherited_from |
\Zend\Mvc\Controller\AbstractController::setPluginManager() |
Parameters
Returns
Set serviceManager instance
setServiceLocator(\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator) : void
Inherited
inherited_from |
\Zend\Mvc\Controller\AbstractController::setServiceLocator() |
Parameters
Register the default events for this controller
attachDefaultListeners() : void
Inherited
inherited_from |
\Zend\Mvc\Controller\AbstractController::attachDefaultListeners() |
createConsoleNotFoundModel()
createConsoleNotFoundModel($response)
deprecated |
please use the {@see \Zend\Mvc\Controller\Plugin\CreateConsoleNotFoundModel} plugin instead: this
method will be removed in release 2.5 or later.
{@inheritDoc} |
Parameters
$response
createHttpNotFoundModel()
createHttpNotFoundModel(\Zend\Http\Response $response)
deprecated |
please use the {@see \Zend\Mvc\Controller\Plugin\CreateHttpNotFoundModel} plugin instead: this
method will be removed in release 2.5 or later.
{@inheritDoc} |
Parameters
$response
Properties
$eventIdentifier
$eventIdentifier : null | string | string[]