1 | <?php |
||
38 | 1 | class Control extends Application\UI\Control |
|
39 | { |
||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | private $templateFile; |
||
44 | |||
45 | /** |
||
46 | * @var Storage\IStorage |
||
47 | */ |
||
48 | private $storage; |
||
49 | |||
50 | /** |
||
51 | * @var Localization\ITranslator |
||
52 | */ |
||
53 | private $translator; |
||
54 | |||
55 | /** |
||
56 | * @var bool |
||
57 | */ |
||
58 | private $useTitle = FALSE; |
||
59 | |||
60 | /** |
||
61 | * @var bool |
||
62 | */ |
||
63 | private $useOverlay = FALSE; |
||
64 | |||
65 | /** |
||
66 | * @param Localization\ITranslator $translator |
||
67 | */ |
||
68 | public function injectTranslator(Localization\ITranslator $translator = NULL) |
||
72 | |||
73 | /** |
||
74 | * @param NULL|string $templateFile |
||
75 | * @param Storage\IStorage $storage |
||
76 | * |
||
77 | * @throws Exceptions\FileNotFoundException |
||
78 | */ |
||
79 | public function __construct( |
||
91 | |||
92 | /** |
||
93 | * @param \Nette\ComponentModel\IComponent |
||
94 | */ |
||
95 | public function attached($presenter) |
||
101 | |||
102 | /** |
||
103 | * @return void |
||
104 | */ |
||
105 | public function enableTitle() |
||
109 | |||
110 | /** |
||
111 | * @return void |
||
112 | */ |
||
113 | public function disableTitle() |
||
117 | |||
118 | /** |
||
119 | * @return void |
||
120 | */ |
||
121 | public function enableOverlay() |
||
125 | |||
126 | /** |
||
127 | * @return void |
||
128 | */ |
||
129 | public function disableOverlay() |
||
133 | |||
134 | /** |
||
135 | * Prepare component for rendering |
||
136 | */ |
||
137 | public function beforeRender() |
||
160 | |||
161 | /** |
||
162 | * Render control |
||
163 | */ |
||
164 | public function render() |
||
177 | |||
178 | /** |
||
179 | * Change default control template path |
||
180 | * |
||
181 | * @param string $templateFile |
||
182 | * |
||
183 | * @return void |
||
184 | * |
||
185 | * @throws Exceptions\FileNotFoundException |
||
186 | */ |
||
187 | public function setTemplateFile($templateFile) |
||
206 | |||
207 | /** |
||
208 | * @param Localization\ITranslator $translator |
||
209 | * |
||
210 | * @return void |
||
211 | */ |
||
212 | public function setTranslator(Localization\ITranslator $translator) |
||
216 | |||
217 | /** |
||
218 | * @return Localization\ITranslator|null |
||
219 | */ |
||
220 | public function getTranslator() |
||
228 | } |
||
229 |
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: