cakephp2-php8/cake/libs/controller/cake_error_controller.php
mark_story ef77e60cb0 Removing @subpackage tags, moving contents of @subpackage into @package.
Removing duplicate cake.cake in @package tags.
Renaming cake.app -> app
2010-12-24 14:09:57 -05:00

47 lines
No EOL
871 B
PHP

<?php
/**
* Error Handling Controller
*
* Controller used by ErrorHandler to render error views.
*
* @package 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());
$this->request = Router::getRequest(false);
$this->constructClasses();
$this->Components->trigger('initialize', array(&$this));
$this->_set(array('cacheAction' => false, 'viewPath' => 'errors'));
}
/**
* Escapes the viewVars.
*
* @return void
*/
function beforeRender() {
parent::beforeRender();
foreach ($this->viewVars as $key => $value) {
if (!is_object($value)){
$this->viewVars[$key] = h($value);
}
}
}
}