1 | <?php |
||
15 | class PluginRepository |
||
16 | { |
||
17 | |||
18 | /** |
||
19 | * @var array of AbstractPlugin |
||
20 | */ |
||
21 | protected $plugins = []; |
||
22 | |||
23 | /** |
||
24 | * @var array errors during load; keys: 'message' and 'code' |
||
25 | */ |
||
26 | protected $loadErrors = []; |
||
27 | |||
28 | /** |
||
29 | * @var directory plug-in root directory |
||
30 | */ |
||
31 | protected $directory; |
||
32 | |||
33 | /** |
||
34 | * Constructor |
||
35 | * |
||
36 | * @param string $directory root directory for plug-in folder |
||
37 | */ |
||
38 | 28 | public function __construct($directory) |
|
43 | |||
44 | /** |
||
45 | * get load errors |
||
46 | * |
||
47 | * @return array |
||
48 | */ |
||
49 | 28 | public function getLoadErrors() |
|
53 | |||
54 | /** |
||
55 | * loads all activated plugins from $settings |
||
56 | * |
||
57 | * @param array $settings plugin-settings |
||
58 | * @return array of AbstractPlugin |
||
59 | * @throws PluginException |
||
60 | */ |
||
61 | 28 | public function loadAll($settings) |
|
79 | |||
80 | /** |
||
81 | * load and return single plugin |
||
82 | * |
||
83 | * @param $pluginKey |
||
84 | * @return AbstractPlugin |
||
85 | * @throws PluginException |
||
86 | */ |
||
87 | 28 | protected function load($pluginKey) |
|
114 | |||
115 | /** |
||
116 | * clear out repository |
||
117 | */ |
||
118 | 28 | protected function reset() |
|
123 | |||
124 | /** |
||
125 | * auto-loader plugin namespace |
||
126 | * |
||
127 | * @param $className |
||
128 | */ |
||
129 | 5 | public function autoload($className) |
|
149 | } |
||
150 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..