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) |
||
102 | |||
103 | |||
104 | /** |
||
105 | * @param ApiRoute $route |
||
106 | * @param Request $request |
||
107 | * @return void |
||
108 | */ |
||
109 | public function generateTarget(ApiRoute $route, Request $request) |
||
125 | |||
126 | |||
127 | /** |
||
128 | * @param ApiRoute $route |
||
129 | * @param array $sections |
||
130 | * @param string $file_name |
||
131 | * @return void |
||
132 | */ |
||
133 | public function generateOne(ApiRoute $route, $sections, $file_name) |
||
144 | |||
145 | |||
146 | /** |
||
147 | * @param array $sections |
||
148 | * @return void |
||
149 | */ |
||
150 | public function generateIndex($sections) |
||
160 | |||
161 | |||
162 | /** |
||
163 | * @return void |
||
164 | */ |
||
165 | public function generateSuccess() |
||
179 | |||
180 | |||
181 | /** |
||
182 | * @param string |
||
183 | * @return Nette\Application\UI\ITemplate |
||
184 | */ |
||
185 | public function createTemplate($which) |
||
200 | |||
201 | |||
202 | /******************************************************************************** |
||
203 | * INTERNAL * |
||
204 | ********************************************************************************/ |
||
205 | |||
206 | |||
207 | /** |
||
208 | * Recursively flatten \IteratorAggregate (probably Nette\Application\Routers\RouteList) |
||
209 | * @param \IteratorAggregate $i |
||
210 | * @return array |
||
211 | */ |
||
212 | private function getApiRoutesFromIterator(\IteratorAggregate $i) |
||
230 | |||
231 | } |
||
232 |
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: