1010. Class

1010.1. Zend\Mvc\View\Http\RouteNotFoundStrategy

1010.1.1. Methods

1010.1.1.1. attach

attach()

Attach the aggregate to the specified event manager

Parameters:EventManagerInterface
Return type:void

1010.1.1.2. setDisplayExceptions

setDisplayExceptions()

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

Parameters:bool
Return type:RouteNotFoundStrategy

1010.1.1.3. displayExceptions

displayExceptions()

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

Return type:bool

1010.1.1.4. detach

detach()

Detach aggregate listeners from the specified event manager

Parameters:EventManagerInterface
Return type:void

1010.1.1.5. setDisplayNotFoundReason

setDisplayNotFoundReason()

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

Parameters:bool
Return type:RouteNotFoundStrategy

1010.1.1.6. displayNotFoundReason

displayNotFoundReason()

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

Return type:bool

1010.1.1.7. setNotFoundTemplate

setNotFoundTemplate()

Get template for not found conditions

Parameters:string
Return type:RouteNotFoundStrategy

1010.1.1.8. getNotFoundTemplate

getNotFoundTemplate()

Get template for not found conditions

Return type:string

1010.1.1.9. detectNotFoundError

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.

Parameters:MvcEvent
Return type:void

1010.1.1.10. prepareNotFoundViewModel

prepareNotFoundViewModel()

Create and return a 404 view model

Parameters:MvcEvent
Return type:void

1010.1.1.11. injectNotFoundReason

injectNotFoundReason()

Inject the not-found reason into the model

If $displayNotFoundReason is enabled, checks to see if $reason is set, and, if so, injects it into the model. If not, it injects Application::ERROR_CONTROLLER_CANNOT_DISPATCH.

Parameters:ViewModel
Return type:void

1010.1.1.12. injectException

injectException()

Inject the exception message into the model

If $displayExceptions is enabled, and an exception is found in the event, inject it into the model.

Parameters:
  • ViewModel
  • MvcEvent
Return type:

void

1010.1.1.13. injectController

injectController()

Inject the controller and controller class into the model

If either $displayExceptions or $displayNotFoundReason are enabled, injects the controllerClass from the MvcEvent. It checks to see if a controller is present in the MvcEvent, and, if not, grabs it from the route match if present; if a controller is found, it injects it into the model.

Parameters:
  • ViewModel
  • MvcEvent
Return type:

void