Class RouteNotFoundStrategy

Summary

Fully Qualified Name: Zend\Mvc\View\Http\RouteNotFoundStrategy
Extends: AbstractListenerAggregate

Description

Methods

Name Description Defined By
attach() {@inheritDoc} RouteNotFoundStrategy
detach() {@inheritDoc} AbstractListenerAggregate
detectNotFoundError() Detect if an error is a 404 condition RouteNotFoundStrategy
displayExceptions() Should we display exceptions related to a not-found condition? RouteNotFoundStrategy
displayNotFoundReason() Should we display the reason for a not-found condition? RouteNotFoundStrategy
getNotFoundTemplate() Get template for not found conditions RouteNotFoundStrategy
prepareNotFoundViewModel() Create and return a 404 view model RouteNotFoundStrategy
setDisplayExceptions() Set value indicating whether or not to display exceptions related to a not-found condition RouteNotFoundStrategy
setDisplayNotFoundReason() Set value indicating whether or not to display the reason for a not-found condition RouteNotFoundStrategy
setNotFoundTemplate() Get template for not found conditions RouteNotFoundStrategy

Method Details

attach()

{@inheritDoc}

Parameter Name Type Description
$events
$priority

Returns:

detach()

{@inheritDoc}

Parameter Name Type Description
$events

Returns:

detectNotFoundError()

Detect if an error is a 404 condition

If a "controller not found" or "invalid controller" error type is encountered, sets the response status code to 404.

Parameter Name Type Description
$e \MvcEvent

Returns: void

displayExceptions()

Should we display exceptions related to a not-found condition?

Returns: bool

displayNotFoundReason()

Should we display the reason for a not-found condition?

Returns: bool

getNotFoundTemplate()

Get template for not found conditions

Returns: string

prepareNotFoundViewModel()

Create and return a 404 view model

Parameter Name Type Description
$e \MvcEvent

Returns: void

setDisplayExceptions()

Set value indicating whether or not to display exceptions related to a not-found condition

Parameter Name Type Description
$displayExceptions bool

Returns: \RouteNotFoundStrategy

setDisplayNotFoundReason()

Set value indicating whether or not to display the reason for a not-found condition

Parameter Name Type Description
$displayNotFoundReason bool

Returns: \RouteNotFoundStrategy

setNotFoundTemplate()

Get template for not found conditions

Parameter Name Type Description
$notFoundTemplate string

Returns: \RouteNotFoundStrategy

Top