2010-08-28 05:37:39 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Error Handling Controller
|
|
|
|
*
|
|
|
|
* Controller used by ErrorHandler to render error views.
|
|
|
|
*
|
|
|
|
* @package cake
|
|
|
|
* @subpackage cake.cake.libs
|
|
|
|
*/
|
|
|
|
class CakeErrorController extends AppController {
|
|
|
|
public $name = 'CakeError';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Uses Property
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public $uses = array();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* __construct
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function __construct() {
|
|
|
|
parent::__construct();
|
|
|
|
$this->_set(Router::getPaths());
|
2010-08-29 03:32:14 +00:00
|
|
|
$this->request = $this->params = Router::getRequest(false);
|
2010-08-28 05:37:39 +00:00
|
|
|
$this->constructClasses();
|
|
|
|
$this->Components->trigger('initialize', array(&$this));
|
|
|
|
$this->_set(array('cacheAction' => false, 'viewPath' => 'errors'));
|
|
|
|
}
|
2010-08-30 03:31:20 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Escapes the viewVars.
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function beforeRender() {
|
2010-08-30 03:38:46 +00:00
|
|
|
parent::beforeRender();
|
2010-08-30 03:31:20 +00:00
|
|
|
foreach ($this->viewVars as $key => $value) {
|
|
|
|
$this->viewVars[$key] = h($value);
|
|
|
|
}
|
|
|
|
}
|
2010-08-28 05:37:39 +00:00
|
|
|
}
|