From: Gabriel Baker Date: Fri, 2 Mar 2012 21:21:24 +0000 (+0000) Subject: removed error controller bits X-Git-Url: http://git.inspyration.org/?a=commitdiff_plain;h=35b684cf5bb0beede444a848a4a269134435ca64;p=zf2.biz%2Fgalerie.git removed error controller bits --- diff --git a/module/Application/autoload_classmap.php b/module/Application/autoload_classmap.php index acf5238..156e8bd 100644 --- a/module/Application/autoload_classmap.php +++ b/module/Application/autoload_classmap.php @@ -1,6 +1,5 @@ __DIR__ . '/src/Application/Controller/IndexController.php', - 'Application\Controller\ErrorController' => __DIR__ . '/src/Application/Controller/ErrorController.php', 'Application\Module' => __DIR__ . '/Module.php', ); diff --git a/module/Application/src/Application/Controller/ErrorController.php b/module/Application/src/Application/Controller/ErrorController.php deleted file mode 100644 index d959f98..0000000 --- a/module/Application/src/Application/Controller/ErrorController.php +++ /dev/null @@ -1,34 +0,0 @@ -request->getMetadata('error', false); - if (!$error) { - $error = array( - 'type' => 404, - 'message' => 'Page not found', - ); - } - - switch ($error['type']) { - case self::ERROR_NO_ROUTE: - case self::ERROR_NO_CONTROLLER: - default: - // 404 error -- controller or action not found - $this->response->setStatusCode(404); - break; - } - - return new ViewModel(array('message' => $error['message'])); - } -}