Abstract aggregate listener

package Default
inherited_from \Zend\EventManager\AbstractListenerAggregate

 Methods

{@inheritDoc}

attach(\Zend\EventManager\EventManagerInterface $events) 

Parameters

$events

Detach all previously attached listeners

detach(\Zend\EventManager\EventManagerInterface $events) 
Inherited
inherited_from \Zend\EventManager\ListenerAggregateInterface::detach()

Parameters

$events

Should we display exceptions in error pages?

displayExceptions() : boolean

Returns

boolean

Get current template for message that will be shown in Console.

getMessage() : string

Returns

string

getPreviousMessage()

getPreviousMessage() : callable | string

Returns

callablestring

Create an exception view model, and set the HTTP status code

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.

Parameters

$e

\Zend\Mvc\MvcEvent

Flag: display exceptions in error pages?

setDisplayExceptions(boolean $displayExceptions) : \Zend\Mvc\View\Console\ExceptionStrategy

Parameters

$displayExceptions

boolean

Returns

\Zend\Mvc\View\Console\ExceptionStrategy

Set template for message that will be shown in Console.

setMessage(string|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

Parameters

$message

stringcallable

Returns

\Zend\Mvc\View\Console\ExceptionStrategy

Sets template for previous message that will be shown in Console.

setPreviousMessage(string $previousMessage) : \Zend\Mvc\View\Console\ExceptionStrategy

Parameters

$previousMessage

string

Returns

\Zend\Mvc\View\Console\ExceptionStrategy

 Properties

 

Display exceptions?

$displayExceptions : boolean

Default

true
 

$listeners

$listeners : array<mixed,\Zend\Stdlib\CallbackHandler>

Default

array()
 

A template for message to show in console when an exception has occurred.

$message : string | callable

Default

 

A template for message to show in console when an exception has previous exceptions.

$previousMessage : string

Default