removed error controller bits
authorGabriel Baker <gabriel@autonomicpilot.co.uk>
Fri, 2 Mar 2012 21:21:24 +0000 (21:21 +0000)
committerGabriel Baker <gabriel@autonomicpilot.co.uk>
Fri, 2 Mar 2012 21:21:24 +0000 (21:21 +0000)
module/Application/autoload_classmap.php
module/Application/src/Application/Controller/ErrorController.php [deleted file]

index acf5238..156e8bd 100644 (file)
@@ -1,6 +1,5 @@
 <?php
 return array(
     'Application\Controller\IndexController' => __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 (file)
index d959f98..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-<?php
-
-namespace Application\Controller;
-
-use Zend\Mvc\Controller\ActionController,
-    Zend\View\Model\ViewModel;
-
-class ErrorController extends ActionController
-{
-    const ERROR_NO_ROUTE = 404;
-    const ERROR_NO_CONTROLLER = 404;
-
-    public function indexAction()
-    {
-        $error = $this->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']));
-    }
-}