1 | <?php |
||
20 | class Config extends \hiqdev\yii2\collection\Object |
||
21 | { |
||
22 | protected $_included = []; |
||
23 | |||
24 | public function hasGoal($id) |
||
25 | { |
||
26 | return $this->hasItem($id); |
||
27 | } |
||
28 | |||
29 | 3 | public function getItemConfig($id = null, array $config = []) |
|
|
|||
30 | { |
||
31 | if (isset($config['class']) && $this->hasItem($config['class'])) { |
||
32 | $config = array_merge($config, $this->_items[$config['class']]); |
||
33 | } |
||
34 | |||
35 | return ArrayHelper::merge([ |
||
36 | 'class' => 'hidev\controllers\CommonController', |
||
37 | ], $config); |
||
38 | 3 | } |
|
39 | |||
40 | public function createItem($id, $config = []) |
||
44 | |||
45 | public function getItem($id, $default = null) |
||
46 | { |
||
47 | $item = &$this->_items[$id]; |
||
48 | if (is_array($item)) { |
||
49 | if (count($item) === 1 && key($item) === 'alias') { |
||
50 | $item = $this->getItem($item['alias']); |
||
51 | } else { |
||
52 | $item = $this->createItem($id, $item); |
||
53 | } |
||
54 | } |
||
55 | |||
56 | return $item; |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * Include config file, unique only. |
||
61 | * @param string|array $path |
||
62 | * @return bool true if the path was unique and loaded |
||
63 | */ |
||
64 | public function includeConfig($path, $force = false) |
||
77 | |||
78 | public function getGoal($id) |
||
82 | |||
83 | public function getVcs() |
||
88 | } |
||
89 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.