1 | <?php |
||
21 | class Config extends \hiqdev\yii2\collection\Object |
||
22 | { |
||
23 | protected $_included = []; |
||
24 | |||
25 | 5 | public function hasGoal($id) |
|
26 | { |
||
27 | 5 | return $this->hasItem($id); |
|
28 | } |
||
29 | |||
30 | 5 | public function getItemConfig($id = null, array $config = []) |
|
39 | |||
40 | 5 | public function createItem($id, $config = []) |
|
41 | { |
||
42 | 5 | return Yii::createObject($this->getItemConfig($id, $config), [$id, Yii::$app]); |
|
43 | } |
||
44 | |||
45 | 5 | public function getItem($id) |
|
46 | { |
||
47 | 5 | $item = &$this->_items[$id]; |
|
48 | 5 | if (is_array($item)) { |
|
49 | 5 | $item = $this->createItem($id, $item); |
|
50 | 5 | } |
|
51 | |||
52 | 5 | return $item; |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * Include config file, unique only. |
||
57 | * @param string|array $path |
||
58 | * @return bool true if the path was unique and loaded |
||
59 | */ |
||
60 | 2 | public function includeConfig($path, $force = false) |
|
72 | |||
73 | 4 | public function getGoal($id) |
|
74 | { |
||
75 | 4 | return Yii::$app->createControllerById($id); |
|
77 | |||
78 | 2 | public function getVcs() |
|
83 | } |
||
84 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.