Completed
Pull Request — master (#178)
by Fèvre
04:32 queued 01:19
created

ErrorController::beforeRender()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
/**
3
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
4
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
5
 *
6
 * Licensed under The MIT License
7
 * For full copyright and license information, please see the LICENSE.txt
8
 * Redistributions of files must retain the above copyright notice.
9
 *
10
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
11
 * @link          http://cakephp.org CakePHP(tm) Project
12
 * @since         3.3.4
13
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
14
 */
15
namespace App\Controller;
16
17
use Cake\Event\Event;
18
19
/**
20
 * Error Handling Controller
21
 *
22
 * Controller used by ExceptionRenderer to render error responses.
23
 */
24
class ErrorController extends AppController
25
{
26
    /**
27
     * Initialization hook method.
28
     *
29
     * @return void
30
     */
31
    public function initialize()
32
    {
33
        $this->loadComponent('RequestHandler');
34
    }
35
36
    /**
37
     * beforeFilter callback.
38
     *
39
     * @param \Cake\Event\Event $event Event.
40
     * @return \Cake\Network\Response|null|void
41
     */
42
    public function beforeFilter(Event $event)
43
    {
44
    }
45
46
    /**
47
     * beforeRender callback.
48
     *
49
     * @param \Cake\Event\Event $event Event.
50
     * @return \Cake\Network\Response|null|void
51
     */
52
    public function beforeRender(Event $event)
53
    {
54
        parent::beforeRender($event);
55
56
        $this->viewBuilder()->templatePath('Error');
57
    }
58
59
    /**
60
     * afterFilter callback.
61
     *
62
     * @param \Cake\Event\Event $event Event.
63
     * @return \Cake\Network\Response|null|void
64
     */
65
    public function afterFilter(Event $event)
66
    {
67
    }
68
}
69