cakephp2-php8/lib/Cake/Controller/CakeErrorController.php
José Lorenzo Rodríguez 4c0e06c451 Merge remote branch 'origin/2.0' into 2.0-class-loading
Conflicts:
	cake/bootstrap.php
	cake/libs/view/helpers/js.php
	lib/Cake/Model/AclNode.php
	lib/Cake/Model/ConnectionManager.php
	lib/Cake/bootstrap.php
	lib/Cake/tests/cases/libs/controller/controller.test.php
2011-01-02 02:00:03 -04:30

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);
}
}
}
}