2010-08-28 05:37:39 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Error Handling Controller
|
|
|
|
*
|
|
|
|
* Controller used by ErrorHandler to render error views.
|
|
|
|
*
|
2017-06-10 21:33:55 +00:00
|
|
|
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
|
2013-02-08 11:59:49 +00:00
|
|
|
* Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2011-07-31 23:14:36 +00:00
|
|
|
*
|
|
|
|
* Licensed under The MIT License
|
2013-02-08 12:22:51 +00:00
|
|
|
* For full copyright and license information, please see the LICENSE.txt
|
2011-07-31 23:14:36 +00:00
|
|
|
* Redistributions of files must retain the above copyright notice.
|
|
|
|
*
|
2013-02-08 11:59:49 +00:00
|
|
|
* @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2017-06-10 21:33:55 +00:00
|
|
|
* @link https://cakephp.org CakePHP(tm) Project
|
2011-07-26 06:16:14 +00:00
|
|
|
* @package Cake.Controller
|
2011-07-31 23:14:36 +00:00
|
|
|
* @since CakePHP(tm) v 2.0
|
2013-05-30 22:11:14 +00:00
|
|
|
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
2010-08-28 05:37:39 +00:00
|
|
|
*/
|
2011-12-08 15:35:02 +00:00
|
|
|
|
2012-11-01 20:25:37 +00:00
|
|
|
App::uses('AppController', 'Controller');
|
|
|
|
|
2011-12-08 15:35:02 +00:00
|
|
|
/**
|
|
|
|
* Error Handling Controller
|
|
|
|
*
|
|
|
|
* Controller used by ErrorHandler to render error views.
|
|
|
|
*
|
|
|
|
* @package Cake.Controller
|
|
|
|
*/
|
2010-08-28 05:37:39 +00:00
|
|
|
class CakeErrorController extends AppController {
|
2011-07-31 21:05:20 +00:00
|
|
|
|
2010-08-28 05:37:39 +00:00
|
|
|
/**
|
|
|
|
* Uses Property
|
|
|
|
*
|
|
|
|
* @var array
|
|
|
|
*/
|
|
|
|
public $uses = array();
|
|
|
|
|
|
|
|
/**
|
2013-09-08 19:18:59 +00:00
|
|
|
* Constructor
|
2010-08-28 05:37:39 +00:00
|
|
|
*
|
2014-05-31 21:36:05 +00:00
|
|
|
* @param CakeRequest $request Request instance.
|
|
|
|
* @param CakeResponse $response Response instance.
|
2010-08-28 05:37:39 +00:00
|
|
|
*/
|
2011-07-03 19:33:27 +00:00
|
|
|
public function __construct($request = null, $response = null) {
|
|
|
|
parent::__construct($request, $response);
|
2012-11-24 21:13:50 +00:00
|
|
|
$this->constructClasses();
|
|
|
|
if (count(Router::extensions()) &&
|
|
|
|
!$this->Components->attached('RequestHandler')
|
2012-10-25 15:19:53 +00:00
|
|
|
) {
|
2012-11-24 21:13:50 +00:00
|
|
|
$this->RequestHandler = $this->Components->load('RequestHandler');
|
2011-09-17 01:52:12 +00:00
|
|
|
}
|
2012-06-19 02:08:39 +00:00
|
|
|
if ($this->Components->enabled('Auth')) {
|
|
|
|
$this->Components->disable('Auth');
|
|
|
|
}
|
|
|
|
if ($this->Components->enabled('Security')) {
|
|
|
|
$this->Components->disable('Security');
|
|
|
|
}
|
2011-05-16 22:08:51 +00:00
|
|
|
$this->_set(array('cacheAction' => false, 'viewPath' => 'Errors'));
|
2010-08-28 05:37:39 +00:00
|
|
|
}
|
2010-08-30 03:31:20 +00:00
|
|
|
|
2011-01-02 03:16:12 +00:00
|
|
|
}
|