PHP Class Zend\Mvc\View\Http\ExceptionStrategy

Inheritance: extends Zend\EventManager\AbstractListenerAggregate
Show file Open project: zendframework/zend-mvc Class Usage Examples

Protected Properties

Property Type Description
$displayExceptions boolean Display exceptions?
$exceptionTemplate string Name of exception template

Public Methods

Method Description
attach ( Zend\EventManager\EventManagerInterface $events, $priority = 1 ) {@inheritDoc}
displayExceptions ( ) : boolean Should we display exceptions in error pages?
getExceptionTemplate ( ) : string Retrieve the exception template
prepareExceptionViewModel ( MvcEvent $e ) : void Create an exception view model, and set the HTTP status code
setDisplayExceptions ( boolean $displayExceptions ) : ExceptionStrategy Flag: display exceptions in error pages?
setExceptionTemplate ( string $exceptionTemplate ) : ExceptionStrategy Set the exception template

Method Details

attach() public method

{@inheritDoc}
public attach ( Zend\EventManager\EventManagerInterface $events, $priority = 1 )
$events Zend\EventManager\EventManagerInterface

displayExceptions() public method

Should we display exceptions in error pages?
public displayExceptions ( ) : boolean
return boolean

getExceptionTemplate() public method

Retrieve the exception template
public getExceptionTemplate ( ) : string
return string

prepareExceptionViewModel() public method

Create an exception view model, and set the HTTP status code
public prepareExceptionViewModel ( MvcEvent $e ) : void
$e Zend\Mvc\MvcEvent
return void

setDisplayExceptions() public method

Flag: display exceptions in error pages?
public setDisplayExceptions ( boolean $displayExceptions ) : ExceptionStrategy
$displayExceptions boolean
return ExceptionStrategy

setExceptionTemplate() public method

Set the exception template
public setExceptionTemplate ( string $exceptionTemplate ) : ExceptionStrategy
$exceptionTemplate string
return ExceptionStrategy

Property Details

$displayExceptions protected property

Display exceptions?
protected bool $displayExceptions
return boolean

$exceptionTemplate protected property

Name of exception template
protected string $exceptionTemplate
return string