diff --git a/route.php b/route.php index d2d7e4e..34273da 100644 --- a/route.php +++ b/route.php @@ -47,6 +47,10 @@ class route public $viewClass = FALSE; /** Method apply to class object to display the $result */ public $viewMethod = FALSE; + /** Classname containing the error layer */ + public $viewErrorClass = null; + /** Method apply to class object to display the error */ + public $viewErrorMethod = null; /** Filename in views containing the HTML layout. Without .html at the end */ public $layout = FALSE; /** Array to search/replace */ @@ -559,8 +563,14 @@ class route $renderer->result = $message; $renderer->output = $this->output; $renderer->title = $http->codetext ($getCode); - $renderer->viewClass = $this->viewClass; - $renderer->viewMethod = $this->viewMethod; + if ($this->viewErrorClass !== null) + $renderer->viewClass = $this->viewErrorClass; + else + $renderer->viewClass = $this->viewClass; + if ($this->viewErrorMethod !== null) + $renderer->viewMethod = $this->viewErrorMethod; + else + $renderer->viewMethod = $this->viewMethod; $renderer->layout = $this->layout; $renderer->replacement = array_merge ($this->replacement, array ("{exceptionCode}"=>$getCode,