1 | <?php |
||
23 | class View |
||
24 | { |
||
25 | private $container; |
||
26 | |||
27 | |||
28 | /** |
||
29 | * Initializes the object |
||
30 | * |
||
31 | * @param ContainerInterface $container Dependency container |
||
32 | */ |
||
33 | public function __construct( ContainerInterface $container ) |
||
37 | |||
38 | |||
39 | /** |
||
40 | * Creates the view object for the HTML client. |
||
41 | * |
||
42 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object |
||
43 | * @param ServerRequestInterface $request Request object |
||
44 | * @param ResponseInterface $response Response object |
||
45 | * @param array $attributes Associative list of URI parameters |
||
46 | * @param array $templatePaths List of base path names with relative template paths as key/value pairs |
||
47 | * @param string|null $locale Code of the current language or null for no translation |
||
48 | * @return \Aimeos\MW\View\Iface View object |
||
49 | */ |
||
50 | public function create( \Aimeos\MShop\Context\Item\Iface $context, ServerRequestInterface $request, |
||
85 | |||
86 | |||
87 | /** |
||
88 | * Adds the "access" helper to the view object |
||
89 | * |
||
90 | * @param \Aimeos\MW\View\Iface $view View object |
||
91 | * @return \Aimeos\MW\View\Iface Modified view object |
||
92 | */ |
||
93 | protected function addAccess( \Aimeos\MW\View\Iface $view ) |
||
100 | |||
101 | |||
102 | /** |
||
103 | * Adds the "config" helper to the view object |
||
104 | * |
||
105 | * @param \Aimeos\MW\View\Iface $view View object |
||
106 | * @param \Aimeos\MW\Config\Iface $config Configuration object |
||
107 | * @return \Aimeos\MW\View\Iface Modified view object |
||
108 | */ |
||
109 | protected function addConfig( \Aimeos\MW\View\Iface $view, \Aimeos\MW\Config\Iface $config ) |
||
117 | |||
118 | |||
119 | /** |
||
120 | * Adds the "access" helper to the view object |
||
121 | * |
||
122 | * @param \Aimeos\MW\View\Iface $view View object |
||
123 | * @param ServerRequestInterface $request Request object |
||
124 | * @return \Aimeos\MW\View\Iface Modified view object |
||
125 | */ |
||
126 | protected function addCsrf( \Aimeos\MW\View\Iface $view, ServerRequestInterface $request ) |
||
136 | |||
137 | |||
138 | /** |
||
139 | * Adds the "number" helper to the view object |
||
140 | * |
||
141 | * @param \Aimeos\MW\View\Iface $view View object |
||
142 | * @param \Aimeos\MW\Config\Iface $config Configuration object |
||
143 | * @return \Aimeos\MW\View\Iface Modified view object |
||
144 | */ |
||
145 | protected function addNumber( \Aimeos\MW\View\Iface $view, \Aimeos\MW\Config\Iface $config ) |
||
156 | |||
157 | |||
158 | /** |
||
159 | * Adds the "param" helper to the view object |
||
160 | * |
||
161 | * @param \Aimeos\MW\View\Iface $view View object |
||
162 | * @param array $attributes Associative list of request parameters |
||
|
|||
163 | * @return \Aimeos\MW\View\Iface Modified view object |
||
164 | */ |
||
165 | protected static function addParam( \Aimeos\MW\View\Iface $view, array $params ) |
||
172 | |||
173 | |||
174 | /** |
||
175 | * Adds the "request" helper to the view object |
||
176 | * |
||
177 | * @param \Aimeos\MW\View\Iface $view View object |
||
178 | * @param ServerRequestInterface $request Request object |
||
179 | * @return \Aimeos\MW\View\Iface Modified view object |
||
180 | */ |
||
181 | protected static function addRequest( \Aimeos\MW\View\Iface $view, ServerRequestInterface $request ) |
||
188 | |||
189 | |||
190 | /** |
||
191 | * Adds the "response" helper to the view object |
||
192 | * |
||
193 | * @param \Aimeos\MW\View\Iface $view View object |
||
194 | * @param ResponseInterface $response Response object |
||
195 | * @return \Aimeos\MW\View\Iface Modified view object |
||
196 | */ |
||
197 | protected static function addResponse( \Aimeos\MW\View\Iface $view, ResponseInterface $response ) |
||
204 | |||
205 | |||
206 | /** |
||
207 | * Adds the "session" helper to the view object |
||
208 | * |
||
209 | * @param \Aimeos\MW\View\Iface $view View object |
||
210 | * @param \Aimeos\MW\Session\Iface $session Session object |
||
211 | * @return \Aimeos\MW\View\Iface Modified view object |
||
212 | */ |
||
213 | protected function addSession( \Aimeos\MW\View\Iface $view, \Aimeos\MW\Session\Iface $session ) |
||
220 | |||
221 | |||
222 | /** |
||
223 | * Adds the "translate" helper to the view object |
||
224 | * |
||
225 | * @param \Aimeos\MW\View\Iface $view View object |
||
226 | * @param string|null $locale ISO language code, e.g. "de" or "de_CH" |
||
227 | * @return \Aimeos\MW\View\Iface Modified view object |
||
228 | */ |
||
229 | protected function addTranslate( \Aimeos\MW\View\Iface $view, $locale ) |
||
246 | |||
247 | |||
248 | /** |
||
249 | * Adds the "url" helper to the view object |
||
250 | * |
||
251 | * @param \Aimeos\MW\View\Iface $view View object |
||
252 | * @param array $attributes Associative list of URI parameters |
||
253 | * @return \Aimeos\MW\View\Iface Modified view object |
||
254 | */ |
||
255 | protected function addUrl( \Aimeos\MW\View\Iface $view, array $attributes ) |
||
276 | |||
277 | |||
278 | /** |
||
279 | * Adds the Aimeos template functions for Twig |
||
280 | * |
||
281 | * @param \Aimeos\MW\View\Iface $view View object |
||
282 | * @param \Twig_Environment $twig Twig environment object |
||
283 | */ |
||
284 | protected function initTwig( \Aimeos\MW\View\Iface $view, \Twig_Environment $twig ) |
||
301 | } |
||
302 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.