attach()
detach()
displayExceptions()
getMessage()
getPreviousMessage()
prepareExceptionViewModel()
setDisplayExceptions()
setMessage()
setPreviousMessage()
$displayExceptions
$listeners
$message
$previousMessage
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() |
---|
displayExceptions() : bool
bool
getMessage() : string
string
getPreviousMessage() : \Zend\Mvc\View\Console\callable | string
\Zend\Mvc\View\Console\callable
string
prepareExceptionViewModel(\Zend\Mvc\MvcEvent $e) : void
todo | dispatch.error does not halt dispatch unless a response is returned. As such, we likely need to trigger rendering as a low priority dispatch.error event (or goto a render event) to ensure rendering occurs, and that munging of view models occurs when expected. |
---|
setDisplayExceptions(bool $displayExceptions) : \Zend\Mvc\View\Console\ExceptionStrategy
setMessage(string | \Zend\Mvc\View\Console\callable $message) : \Zend\Mvc\View\Console\ExceptionStrategy
The message can be a string (template) or a callable (i.e. a closure).
The closure is expected to return a string and will be called with 2 parameters: Exception $exception - the exception being thrown boolean $displayExceptions - whether to display exceptions or not
If the message is a string, one can use the following template params:
:className - full class name of exception instance :message - exception message :code - exception code :file - the file where the exception has been thrown :line - the line where the exception has been thrown :stack - full exception stack
string\Zend\Mvc\View\Console\callable
setPreviousMessage(string $previousMessage) : \Zend\Mvc\View\Console\ExceptionStrategy
$displayExceptions : bool
$listeners : \Zend\Stdlib\CallbackHandler[]
inherited_from | \Zend\EventManager\AbstractListenerAggregate::$$listeners |
---|
$previousMessage : string