attach()
detach()
detectNotFoundError()
displayExceptions()
displayNotFoundReason()
getNotFoundTemplate()
prepareNotFoundViewModel()
setDisplayExceptions()
setDisplayNotFoundReason()
setNotFoundTemplate()
injectController()
injectException()
injectNotFoundReason()
$displayExceptions
$displayNotFoundReason
$listeners
$notFoundTemplate
$reason
Abstract aggregate listener
attach(\Zend\EventManager\EventManagerInterface $events) : void
Implementors may add an optional $priority argument; the EventManager implementation will pass this to the aggregate.
detach(\Zend\EventManager\EventManagerInterface $events) : void
inherited_from | \Zend\EventManager\AbstractListenerAggregate::detach() |
---|
detectNotFoundError(\Zend\Mvc\MvcEvent $e) : void
If a "controller not found" or "invalid controller" error type is encountered, sets the response status code to 404.
displayExceptions() : bool
bool
displayNotFoundReason() : bool
bool
getNotFoundTemplate() : string
string
prepareNotFoundViewModel(\Zend\Mvc\MvcEvent $e) : void
setDisplayExceptions(bool $displayExceptions) : \Zend\Mvc\View\Http\RouteNotFoundStrategy
setDisplayNotFoundReason(bool $displayNotFoundReason) : \Zend\Mvc\View\Http\RouteNotFoundStrategy
setNotFoundTemplate(string $notFoundTemplate) : \Zend\Mvc\View\Http\RouteNotFoundStrategy
injectController(\Zend\View\Model\ViewModel $model, \Zend\Mvc\MvcEvent $e) : void
If either $displayExceptions or $displayNotFoundReason are enabled, injects the controllerClass from the MvcEvent. It checks to see if a controller is present in the MvcEvent, and, if not, grabs it from the route match if present; if a controller is found, it injects it into the model.
\Zend\View\Model\ViewModel
injectException(\Zend\View\Model\ViewModel $model, \Zend\Mvc\MvcEvent $e) : void
If $displayExceptions is enabled, and an exception is found in the event, inject it into the model.
\Zend\View\Model\ViewModel
injectNotFoundReason(\Zend\View\Model\ViewModel $model) : void
If $displayNotFoundReason is enabled, checks to see if $reason is set, and, if so, injects it into the model. If not, it injects Application::ERROR_CONTROLLER_CANNOT_DISPATCH.
\Zend\View\Model\ViewModel
$displayExceptions : bool
$displayNotFoundReason : bool
$listeners : \Zend\Stdlib\CallbackHandler[]
inherited_from | \Zend\EventManager\AbstractListenerAggregate::$$listeners |
---|
$notFoundTemplate : string
$reason : false | string