1 | <?php |
||
25 | class DataTablesWrapper implements DataTablesWrapperInterface, HTTPInterface { |
||
26 | |||
27 | /** |
||
28 | * Columns. |
||
29 | * |
||
30 | * @var DataTablesColumn[] |
||
31 | */ |
||
32 | private $columns; |
||
33 | |||
34 | /** |
||
35 | * Mapping. |
||
36 | * |
||
37 | * @var DataTablesMappingInterface |
||
38 | */ |
||
39 | private $mapping; |
||
40 | |||
41 | /** |
||
42 | * Method. |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | private $method; |
||
47 | |||
48 | /** |
||
49 | * Name. |
||
50 | * |
||
51 | * @var string |
||
52 | */ |
||
53 | private $name; |
||
54 | |||
55 | /** |
||
56 | * Options. |
||
57 | * |
||
58 | * @var DataTablesOptionsInterface |
||
59 | */ |
||
60 | private $options; |
||
61 | |||
62 | /** |
||
63 | * Order. |
||
64 | * |
||
65 | * @var array |
||
66 | */ |
||
67 | private $order; |
||
68 | |||
69 | /** |
||
70 | * Processing. |
||
71 | * |
||
72 | * @var bool |
||
73 | */ |
||
74 | private $processing; |
||
75 | |||
76 | /** |
||
77 | * Provider. |
||
78 | * |
||
79 | * @var DataTablesProviderInterface |
||
80 | */ |
||
81 | private $provider; |
||
82 | |||
83 | /** |
||
84 | * Request. |
||
85 | * |
||
86 | * @var DataTablesRequestInterface |
||
87 | */ |
||
88 | private $request; |
||
89 | |||
90 | /** |
||
91 | * Response. |
||
92 | * |
||
93 | * @var DataTablesResponseInterface |
||
94 | */ |
||
95 | private $response; |
||
96 | |||
97 | /** |
||
98 | * Server side. |
||
99 | * |
||
100 | * @var bool |
||
101 | */ |
||
102 | private $serverSide; |
||
103 | |||
104 | /** |
||
105 | * URL. |
||
106 | * |
||
107 | * @var string |
||
108 | */ |
||
109 | private $url; |
||
110 | |||
111 | /** |
||
112 | * Constructor. |
||
113 | * |
||
114 | * @param string $method The method. |
||
115 | * @param string $url The URL. |
||
116 | * @param string $name The name. |
||
117 | */ |
||
118 | public function __construct($method, $url, $name) { |
||
119 | $this->setColumns([]); |
||
120 | $this->setMethod($method); |
||
121 | $this->setMapping(new DataTablesMapping()); |
||
122 | $this->setName($name); |
||
123 | $this->setOrder([]); |
||
124 | $this->setProcessing(true); |
||
125 | $this->setServerSide(true); |
||
126 | $this->setUrl($url); |
||
127 | } |
||
128 | |||
129 | /** |
||
130 | * Add a column. |
||
131 | * |
||
132 | * @param DataTablesColumn $column The column. |
||
133 | * @return DataTablesWrapper Returns this wrapper. |
||
134 | */ |
||
135 | public function addColumn(DataTablesColumn $column) { |
||
142 | |||
143 | /** |
||
144 | * Get a column. |
||
145 | * |
||
146 | * @param string $data The column data. |
||
147 | * @return DataTablesColumn Returns the column in case of success, null otherwise. |
||
148 | */ |
||
149 | public function getColumn($data) { |
||
155 | |||
156 | /** |
||
157 | * Get the columns. |
||
158 | * |
||
159 | * @return DataTablesColumn[] Returns the columns. |
||
160 | */ |
||
161 | public function getColumns() { |
||
164 | |||
165 | /** |
||
166 | * Get the mapping. |
||
167 | * |
||
168 | * @return DataTablesMappingInterface Returns the mapping. |
||
169 | */ |
||
170 | public function getMapping() { |
||
173 | |||
174 | /** |
||
175 | * Get the method. |
||
176 | * |
||
177 | * @return string Returns the method. |
||
178 | */ |
||
179 | public function getMethod() { |
||
182 | |||
183 | /** |
||
184 | * Get the name. |
||
185 | * |
||
186 | * @return string Returns the name. |
||
187 | */ |
||
188 | public function getName() { |
||
191 | |||
192 | /** |
||
193 | * Get the options. |
||
194 | * |
||
195 | * @return DataTablesOptionsInterface Returns the options. |
||
196 | */ |
||
197 | public function getOptions() { |
||
200 | |||
201 | /** |
||
202 | * Get the order. |
||
203 | * |
||
204 | * @return array Returns the order. |
||
205 | */ |
||
206 | public function getOrder() { |
||
209 | |||
210 | /** |
||
211 | * Get the processing. |
||
212 | * |
||
213 | * @return bool Returns the processing. |
||
214 | */ |
||
215 | public function getProcessing() { |
||
218 | |||
219 | /** |
||
220 | * Get the provider. |
||
221 | * |
||
222 | * @return DataTablesProviderInterface Returns the provider. |
||
223 | */ |
||
224 | public function getProvider() { |
||
227 | |||
228 | /** |
||
229 | * Get the request. |
||
230 | * |
||
231 | * @return DataTablesRequestInterface The request. |
||
232 | */ |
||
233 | public function getRequest() { |
||
236 | |||
237 | /** |
||
238 | * Get the response. |
||
239 | * |
||
240 | * @return DataTablesResponseInterface Returns the response. |
||
241 | */ |
||
242 | public function getResponse() { |
||
245 | |||
246 | /** |
||
247 | * Get the server side. |
||
248 | * |
||
249 | * @return bool Returns the server side. |
||
250 | */ |
||
251 | public function getServerSide() { |
||
254 | |||
255 | /** |
||
256 | * Get the URL. |
||
257 | * |
||
258 | * @return string Returns the URL. |
||
259 | */ |
||
260 | public function getUrl() { |
||
263 | |||
264 | /** |
||
265 | * Parse a request. |
||
266 | * |
||
267 | * @param Request $request The request. |
||
268 | * @return DataTablesWrapper Returns this wrapper. |
||
269 | */ |
||
270 | public function parse(Request $request) { |
||
275 | |||
276 | /** |
||
277 | * Remove a column. |
||
278 | * |
||
279 | * @param DataTablesColumn $column The column. |
||
280 | * @return DataTablesWrapper Returns this wrapper. |
||
281 | */ |
||
282 | public function removeColumn(DataTablesColumn $column) { |
||
289 | |||
290 | /** |
||
291 | * Set the columns. |
||
292 | * |
||
293 | * @param DataTablesColumn[] $columns The columns. |
||
294 | * @return DataTablesWrapper Returns this wrapper. |
||
295 | */ |
||
296 | private function setColumns(array $columns) { |
||
300 | |||
301 | /** |
||
302 | * Set the method. |
||
303 | * |
||
304 | * @param string $method The method. |
||
305 | * @return DataTablesWrapper Returns this wrapper. |
||
306 | */ |
||
307 | public function setMethod($method) { |
||
311 | |||
312 | /** |
||
313 | * Set the mapping. |
||
314 | * |
||
315 | * @param DataTablesMappingInterface $mapping The mapping |
||
316 | * @return DataTablesWrapper Returns this wrapper. |
||
317 | */ |
||
318 | public function setMapping(DataTablesMappingInterface $mapping) { |
||
322 | |||
323 | /** |
||
324 | * Set the name. |
||
325 | * |
||
326 | * @param string $name The name. |
||
327 | * @return DataTablesWrapper Returns this wrapper. |
||
328 | */ |
||
329 | public function setName($name) { |
||
333 | |||
334 | /** |
||
335 | * Set the options. |
||
336 | * |
||
337 | * @param DataTablesOptionsInterface $options The options. |
||
338 | * @return DataTablesWrapper Returns this wrapper. |
||
339 | */ |
||
340 | public function setOptions(DataTablesOptionsInterface $options) { |
||
344 | |||
345 | /** |
||
346 | * Set the order. |
||
347 | * |
||
348 | * @param array $order The order. |
||
349 | * @return DataTablesWrapper Returns this wrapper. |
||
350 | */ |
||
351 | public function setOrder(array $order) { |
||
355 | |||
356 | /** |
||
357 | * Set the processing. |
||
358 | * |
||
359 | * @param bool $processing The processing. |
||
360 | * @return DataTablesWrapper Returns this wrapper. |
||
361 | */ |
||
362 | public function setProcessing($processing) { |
||
366 | |||
367 | /** |
||
368 | * Set the provider. |
||
369 | * |
||
370 | * @param DataTablesProviderInterface $provider The provider. |
||
371 | * @return DataTablesWrapper Returns this wrapper. |
||
372 | */ |
||
373 | public function setProvider(DataTablesProviderInterface $provider) { |
||
377 | |||
378 | /** |
||
379 | * Set the request. |
||
380 | * |
||
381 | * @param DataTablesRequestInterface $request The request. |
||
382 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
383 | */ |
||
384 | public function setRequest(DataTablesRequestInterface $request) { |
||
388 | |||
389 | /** |
||
390 | * Set the response. |
||
391 | * |
||
392 | * @param DataTablesResponseInterface $response The response. |
||
393 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
394 | */ |
||
395 | public function setResponse(DataTablesResponseInterface $response) { |
||
399 | |||
400 | /** |
||
401 | * Set the server side. |
||
402 | * |
||
403 | * @param bool $serverSide The server side. |
||
404 | * @return DataTablesWrapper Returns this wrapper. |
||
405 | */ |
||
406 | public function setServerSide($serverSide) { |
||
410 | |||
411 | /** |
||
412 | * Set the URL. |
||
413 | * |
||
414 | * @param string $url The UTL. |
||
415 | * @return DataTablesWrapper Returns this wrapper. |
||
416 | */ |
||
417 | public function setUrl($url) { |
||
421 | |||
422 | } |
||
423 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.