1 | <?php |
||
14 | class Router extends ExternalModule |
||
15 | { |
||
16 | /** @deprecated Use E_MODULES */ |
||
17 | const EVENT_START_GENERATE_RESOURCES = 'resourcer.modulelist'; |
||
18 | /** Event for modifying modules */ |
||
19 | const E_MODULES = 'resourcer.modulelist'; |
||
20 | /** Event for resources preloading */ |
||
21 | const E_RESOURCE_PRELOAD = ResourceManager::E_ANALYZE; |
||
22 | /** Event for resources compiling */ |
||
23 | const E_RESOURCE_COMPILE = ResourceManager::E_COMPILE; |
||
24 | /** Event when recourse management is finished */ |
||
25 | const E_FINISHED = 'resourcer.finished'; |
||
26 | |||
27 | /** @deprecated Identifier */ |
||
28 | protected $id = STATIC_RESOURCE_HANDLER; |
||
29 | |||
30 | /** @var array Assets cache */ |
||
31 | protected $cache = []; |
||
32 | |||
33 | /** @var array Template markers for inserting assets */ |
||
34 | protected $templateMarkers = [ |
||
35 | 'css' => '</head>', |
||
36 | 'js' => '</body>' |
||
37 | ]; |
||
38 | /** @var array Collection of static resources */ |
||
39 | protected $resources = []; |
||
40 | |||
41 | /** @var array Collection of static resource URLs */ |
||
42 | protected $resourceUrls = []; |
||
43 | |||
44 | /** |
||
45 | * Module initialization stage. |
||
46 | * |
||
47 | * @see ModuleConnector::init() |
||
48 | * |
||
49 | * @param array $params Initialization parameters |
||
50 | * |
||
51 | * @return bool True if resource successfully initialized |
||
52 | */ |
||
53 | public function init(array $params = array()) |
||
86 | |||
87 | /** |
||
88 | * Get asset files from modules. |
||
89 | * |
||
90 | * @param array $moduleList Collection of modules |
||
91 | * |
||
92 | * @return array Resources paths |
||
93 | */ |
||
94 | private function getAssets($moduleList) |
||
115 | |||
116 | /** |
||
117 | * Template rendering handler by injecting static assets url |
||
118 | * in appropriate. |
||
119 | * |
||
120 | * @param $view |
||
121 | * |
||
122 | * @return mixed |
||
123 | */ |
||
124 | public function renderTemplate(&$view) |
||
145 | |||
146 | /** |
||
147 | * Get cached asset URL. |
||
148 | * |
||
149 | * @param string $cachedAsset Full path to cached asset |
||
150 | * |
||
151 | * @return mixed Cached asset URL |
||
152 | */ |
||
153 | private function getAssetCachedUrl($cachedAsset) |
||
157 | } |
||
158 |
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: