public function pageNotFoundErrorAction() { $response =
$this->
Response();
$targetEmotionId =
(int) $this->
get('config'
)->
get('PageNotFoundDestination'
);
$targetErrorCode =
$this->
get('config'
)->
get('PageNotFoundCode', 404
);
$response->
setStatusCode($targetErrorCode);
// Page not Found should not get logged in error handler
$response->
unsetExceptions();
switch ($targetEmotionId) { case -2:
case null:
$this->
forward( $this->
get('front'
)->
Dispatcher()->
getDefaultAction(),
$this->
get('front'
)->
Dispatcher()->
getDefaultControllerName() );
break;
case -1:
$this->
forward('genericError', null, null,
['code' =>
$targetErrorCode]);