public function attach(EventCollection $events)
{
$this->listeners[] = $events->attach('dispatch.error', array($this, 'renderError'));
- $this->listeners[] = $events->attach('dispatch', array($this, 'render404'), -80);
- $this->listeners[] = $events->attach('dispatch', array($this, 'renderLayout'), -1000);
+ $this->listeners[] = $events->attach('dispatch', array($this, 'render404'), -1000);
+ $this->listeners[] = $events->attach('dispatch', array($this, 'renderLayout'), -80);
}
public function detach(EventCollection $events)
$response->setStatusCode(404);
}
- $script = 'pages/' . $page . '.phtml';
+ $script = 'error/' . $page . '.phtml';
// Action content
$content = $this->view->render($script);
'display_exceptions' => $this->displayExceptions(),
);
- $content = $this->view->render('pages/404.phtml', $vars);
+ $content = $this->view->render('error/404.phtml', $vars);
$e->setResult($content);