Zend\Mvc\View\Http\RouteNotFoundStrategy
Synopsis
class RouteNotFoundStrategy
extends AbstractListenerAggregate
{
- // members
- protected bool $displayExceptions;
- protected bool $displayNotFoundReason;
- protected string $notFoundTemplate;
- protected false|string $reason;
- // Inherited members from AbstractListenerAggregate
- protected array $listeners;
- // methods
- public void attach()
- public RouteNotFoundStrategy setDisplayExceptions()
- public bool displayExceptions()
- public RouteNotFoundStrategy setDisplayNotFoundReason()
- public bool displayNotFoundReason()
- public RouteNotFoundStrategy setNotFoundTemplate()
- public string getNotFoundTemplate()
- public void detectNotFoundError()
- public void prepareNotFoundViewModel()
- protected void injectNotFoundReason()
- protected void injectException()
- protected void injectController()
- // Inherited methods from AbstractListenerAggregate
- public void detach()
Hierarchy
Members
protected
- $displayExceptions
—
Zend\Mvc\View\Http\bool
Whether or not to display exceptions related to the 404 condition - $displayNotFoundReason
—
Zend\Mvc\View\Http\bool
Whether or not to display the reason for a 404 - $listeners — array
- $notFoundTemplate
—
string
Template to use to report page not found conditions - $reason
—
Zend\Mvc\View\Http\false|string
The reason for a not-found condition
Methods
protected
- injectController() — Inject the controller and controller class into the model
- injectException() — Inject the exception message into the model
- injectNotFoundReason() — Inject the not-found reason into the model
public
- attach() — {@inheritDoc}
- detectNotFoundError() — Detect if an error is a 404 condition
- displayExceptions() — Should we display exceptions related to a not-found condition?
- displayNotFoundReason() — Should we display the reason for a not-found condition?
- getNotFoundTemplate() — Get template for not found conditions
- prepareNotFoundViewModel() — Create and return a 404 view model
- setDisplayExceptions() — Set value indicating whether or not to display exceptions related to a not-found condition
- setDisplayNotFoundReason() — Set value indicating whether or not to display the reason for a not-found condition
- setNotFoundTemplate() — Get template for not found conditions
Inherited from Zend\EventManager\AbstractListenerAggregate
public
- detach() — {@inheritDoc}