1 | <?php declare(strict_types=1); |
||
17 | class Router extends ExternalModule |
||
18 | { |
||
19 | /** @deprecated Use E_MODULES */ |
||
20 | const EVENT_START_GENERATE_RESOURCES = 'resourcer.modulelist'; |
||
21 | /** Event for modifying modules */ |
||
22 | const E_MODULES = 'resourcer.modulelist'; |
||
23 | /** Event for resources preloading */ |
||
24 | const E_RESOURCE_PRELOAD = ResourceManager::E_ANALYZE; |
||
25 | /** Event for resources compiling */ |
||
26 | const E_RESOURCE_COMPILE = ResourceManager::E_COMPILE; |
||
27 | /** Event when recourse management is finished */ |
||
28 | const E_FINISHED = 'resourcer.finished'; |
||
29 | |||
30 | const I_MAIN_PROJECT_TEMPLATE = 'main.template'; |
||
31 | |||
32 | /** @var FileManagerInterface File system manager */ |
||
33 | public $fileManager; |
||
34 | |||
35 | /** @deprecated Identifier */ |
||
36 | protected $id = STATIC_RESOURCE_HANDLER; |
||
37 | |||
38 | /** @var array Template markers for inserting assets */ |
||
39 | protected $templateMarkers = ['css' => '</head>', 'js' => '</body>']; |
||
40 | |||
41 | /** @var array Collection of static resources */ |
||
42 | protected $resources = []; |
||
43 | |||
44 | /** @var array Collection of static resource URLs */ |
||
45 | protected $resourceUrls = []; |
||
46 | |||
47 | /** @var ResourceManager */ |
||
48 | protected $resourceManager; |
||
49 | |||
50 | /** |
||
51 | * Module initialization stage. |
||
52 | * |
||
53 | * @see ModuleConnector::init() |
||
54 | * |
||
55 | * @param array $params Initialization parameters |
||
56 | * |
||
57 | * @return bool True if resource successfully initialized |
||
58 | */ |
||
59 | 1 | public function init(array $params = array()) |
|
96 | |||
97 | /** |
||
98 | * Get asset files from modules. |
||
99 | * |
||
100 | * @param array $moduleList Collection of modules |
||
101 | * |
||
102 | * @return string[] Resources paths |
||
103 | */ |
||
104 | 2 | public function getAssets($moduleList) |
|
125 | |||
126 | /** |
||
127 | * Template rendering handler by injecting static assets url |
||
128 | * in appropriate. |
||
129 | * |
||
130 | * @param $view |
||
131 | * |
||
132 | * @return mixed |
||
133 | */ |
||
134 | 1 | public function renderTemplate(&$view, $resourceUrls = []) |
|
157 | |||
158 | /** |
||
159 | * |
||
160 | * @param array $resources |
||
161 | * @param null $moduleList |
||
162 | */ |
||
163 | public function getResources(&$resources = [], $moduleList = null) |
||
173 | |||
174 | /** |
||
175 | * Get cached asset URL. |
||
176 | * |
||
177 | * @param string $cachedAsset Full path to cached asset |
||
178 | * |
||
179 | * @return mixed Cached asset URL |
||
180 | */ |
||
181 | 1 | private function getAssetCachedUrl($cachedAsset) |
|
185 | } |
||
186 |
If you access a property on an interface, you most likely code against a concrete implementation of the interface.
Available Fixes
Adding an additional type check:
Changing the type hint: