From 2d4c24e88b0696fd52d63c29fc7cec8d0c584184 Mon Sep 17 00:00:00 2001 From: Martin Hujer Date: Mon, 19 Dec 2011 17:42:43 +0100 Subject: [PATCH] Remove non-existing PageController --- .../Application/src/Application/View/Listener.php | 37 -------------------- 1 file changed, 37 deletions(-) diff --git a/module/Application/src/Application/View/Listener.php b/module/Application/src/Application/View/Listener.php index fc99fba..5683405 100644 --- a/module/Application/src/Application/View/Listener.php +++ b/module/Application/src/Application/View/Listener.php @@ -55,10 +55,6 @@ class Listener implements ListenerAggregate public function registerStaticListeners(StaticEventCollection $events, $locator) { - $ident = 'Application\Controller\PageController'; - $handler = $events->attach($ident, 'dispatch', array($this, 'renderPageController'), -50); - $this->staticListeners[] = array($ident, $handler); - $ident = 'Zend\Mvc\Controller\ActionController'; $handler = $events->attach($ident, 'dispatch', array($this, 'renderView'), -50); $this->staticListeners[] = array($ident, $handler); @@ -73,39 +69,6 @@ class Listener implements ListenerAggregate } } - public function renderPageController(MvcEvent $e) - { - $page = $e->getResult(); - if ($page instanceof Response) { - return; - } - - $response = $e->getResponse(); - if ($response->isNotFound()) { - return; - } - - $routeMatch = $e->getRouteMatch(); - - if (!$routeMatch) { - $page = '404'; - } else { - $page = $routeMatch->getParam('action', '404'); - } - - if ($page == '404') { - $response->setStatusCode(404); - } - - $script = 'error/' . $page . '.phtml'; - - // Action content - $content = $this->view->render($script); - $e->setResult($content); - - return $this->renderLayout($e); - } - public function renderView(MvcEvent $e) { $response = $e->getResponse(); -- 1.7.10.4