1 | <?php |
||
17 | class Generator extends Nette\Object |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @var Nette\Application\UI\ITemplateFactory |
||
22 | */ |
||
23 | private $templateFactory; |
||
24 | |||
25 | /** |
||
26 | * @var Nette\Http\Request |
||
27 | */ |
||
28 | private $httpRequest; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $api_dir; |
||
34 | |||
35 | |||
36 | /** |
||
37 | * @param string $api_dir |
||
38 | * @param Nette\Application\UI\ITemplateFactory $templateFactory |
||
39 | * @param Nette\Http\Request $httpRequest |
||
40 | */ |
||
41 | public function __construct( |
||
50 | |||
51 | |||
52 | /** |
||
53 | * @param IRouter $router |
||
54 | * @return void |
||
55 | */ |
||
56 | public function generateAll(IRouter $router) |
||
84 | |||
85 | |||
86 | /** |
||
87 | * @param ApiRoute $route |
||
88 | * @param Request $request |
||
89 | * @return void |
||
90 | */ |
||
91 | public function generateTarget(ApiRoute $route, Request $request) |
||
107 | |||
108 | |||
109 | /** |
||
110 | * @param ApiRoute $route |
||
111 | * @param array $sections |
||
112 | * @param string $file_name |
||
113 | * @return void |
||
114 | */ |
||
115 | public function generateOne(ApiRoute $route, $sections, $file_name) |
||
126 | |||
127 | |||
128 | /** |
||
129 | * @param array $sections |
||
130 | * @return void |
||
131 | */ |
||
132 | public function generateIndex($sections) |
||
142 | |||
143 | |||
144 | /** |
||
145 | * @return void |
||
146 | */ |
||
147 | public function generateSuccess() |
||
161 | |||
162 | |||
163 | /** |
||
164 | * @param string |
||
165 | * @return Nette\Application\UI\ITemplate |
||
166 | */ |
||
167 | public function createTemplate($which) |
||
182 | |||
183 | |||
184 | /******************************************************************************** |
||
185 | * INTERNAL * |
||
186 | ********************************************************************************/ |
||
187 | |||
188 | |||
189 | private function splitRoutesIntoSections(IRouter $router) |
||
215 | |||
216 | |||
217 | /** |
||
218 | * Recursively flatten \IteratorAggregate (probably Nette\Application\Routers\RouteList) |
||
219 | * @param \IteratorAggregate $i |
||
220 | * @return array |
||
221 | */ |
||
222 | private function getApiRoutesFromIterator(\IteratorAggregate $i) |
||
240 | |||
241 | } |
||
242 |
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: