Completed
Push — master ( 721877...45fe5c )
by Cheren
02:21
created

AppComponent   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 2
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A initialize() 0 5 1
1
<?php
2
/**
3
 * CakeCMS Core
4
 *
5
 * This file is part of the of the simple cms based on CakePHP 3.
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 *
9
 * @package   Core
10
 * @license   MIT
11
 * @copyright MIT License http://www.opensource.org/licenses/mit-license.php
12
 * @link      https://github.com/CakeCMS/Core".
13
 * @author    Sergey Kalistratov <[email protected]>
14
 */
15
16
namespace Core\Controller\Component;
17
18
use Cake\Controller\Component;
19
use Cake\Controller\Controller;
20
21
/**
22
 * Class AppComponent
23
 *
24
 * @package Core\Controller\Component
25
 */
26
class AppComponent extends Component
27
{
28
29
    /**
30
     * Controller object.
31
     *
32
     * @var Controller
33
     */
34
    protected $_controller;
35
36
    /**
37
     * Constructor hook method.
38
     *
39
     * @param array $config
40
     * @return void
41
     */
42
    public function initialize(array $config)
43
    {
44
        parent::initialize($config);
45
        $this->_controller = $this->_registry->getController();
46
    }
47
}
48