1 | <?php |
||
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 | 1 | * @see ModuleConnector::init() |
|
54 | * |
||
55 | * @param array $params Initialization parameters |
||
56 | 1 | * |
|
57 | * @return bool True if resource successfully initialized |
||
58 | */ |
||
59 | 1 | public function init(array $params = array()) |
|
94 | 2 | ||
95 | /** |
||
96 | 2 | * Get asset files from modules. |
|
97 | * |
||
98 | * @param array $moduleList Collection of modules |
||
99 | 2 | * |
|
100 | 2 | * @return string[] Resources paths |
|
101 | */ |
||
102 | public function getAssets($moduleList) |
||
123 | |||
124 | 1 | /** |
|
125 | * Template rendering handler by injecting static assets url |
||
126 | 1 | * in appropriate. |
|
127 | 1 | * |
|
128 | * @param $view |
||
129 | 1 | * |
|
130 | 1 | * @return mixed |
|
131 | 1 | */ |
|
132 | 1 | public function renderTemplate(&$view, $resourceUrls = []) |
|
155 | 1 | ||
156 | public function getResources(&$resources = [], $moduleList = null) |
||
165 | |||
166 | /** |
||
167 | * Get cached asset URL. |
||
168 | * |
||
169 | * @param string $cachedAsset Full path to cached asset |
||
170 | * |
||
171 | * @return mixed Cached asset URL |
||
172 | */ |
||
173 | private function getAssetCachedUrl($cachedAsset) |
||
177 | } |
||
178 |
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: