1 | <?php |
||
23 | class DataTablesWrapper implements DataTablesWrapperInterface, HTTPInterface { |
||
24 | |||
25 | /** |
||
26 | * Columns. |
||
27 | * |
||
28 | * @var DataTablesColumnInterface[] |
||
29 | */ |
||
30 | private $columns; |
||
31 | |||
32 | /** |
||
33 | * Mapping. |
||
34 | * |
||
35 | * @var DataTablesMappingInterface |
||
36 | */ |
||
37 | private $mapping; |
||
38 | |||
39 | /** |
||
40 | * Method. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | private $method; |
||
45 | |||
46 | /** |
||
47 | * Options. |
||
48 | * |
||
49 | * @var DataTablesOptionsInterface |
||
50 | */ |
||
51 | private $options; |
||
52 | |||
53 | /** |
||
54 | * Order. |
||
55 | * |
||
56 | * @var array |
||
57 | */ |
||
58 | private $order; |
||
59 | |||
60 | /** |
||
61 | * Processing. |
||
62 | * |
||
63 | * @var bool |
||
64 | */ |
||
65 | private $processing; |
||
66 | |||
67 | /** |
||
68 | * Provider. |
||
69 | * |
||
70 | * @var DataTablesProviderInterface |
||
71 | */ |
||
72 | private $provider; |
||
73 | |||
74 | /** |
||
75 | * Request. |
||
76 | * |
||
77 | * @var DataTablesRequestInterface |
||
78 | */ |
||
79 | private $request; |
||
80 | |||
81 | /** |
||
82 | * Response. |
||
83 | * |
||
84 | * @var DataTablesResponseInterface |
||
85 | */ |
||
86 | private $response; |
||
87 | |||
88 | /** |
||
89 | * Server side. |
||
90 | * |
||
91 | * @var bool |
||
92 | */ |
||
93 | private $serverSide; |
||
94 | |||
95 | /** |
||
96 | * URL. |
||
97 | * |
||
98 | * @var string |
||
99 | */ |
||
100 | private $url; |
||
101 | |||
102 | /** |
||
103 | * Constructor. |
||
104 | */ |
||
105 | public function __construct() { |
||
113 | |||
114 | /** |
||
115 | * {@inheritdoc} |
||
116 | */ |
||
117 | public function addColumn(DataTablesColumnInterface $column) { |
||
124 | |||
125 | /** |
||
126 | * {@inheritdoc} |
||
127 | */ |
||
128 | public function getColumn($data) { |
||
134 | |||
135 | /** |
||
136 | * {@inheritdoc} |
||
137 | */ |
||
138 | public function getColumns() { |
||
141 | |||
142 | /** |
||
143 | * {@inheritdoc} |
||
144 | */ |
||
145 | public function getMapping() { |
||
148 | |||
149 | /** |
||
150 | * {@inheritdoc} |
||
151 | */ |
||
152 | public function getMethod() { |
||
155 | |||
156 | /** |
||
157 | * {@inheritdoc} |
||
158 | */ |
||
159 | public function getOptions() { |
||
162 | |||
163 | /** |
||
164 | * {@inheritdoc} |
||
165 | */ |
||
166 | public function getOrder() { |
||
169 | |||
170 | /** |
||
171 | * {@inheritdoc} |
||
172 | */ |
||
173 | public function getProcessing() { |
||
176 | |||
177 | /** |
||
178 | * {@inheritdoc} |
||
179 | */ |
||
180 | public function getProvider() { |
||
183 | |||
184 | /** |
||
185 | * {@inheritdoc} |
||
186 | */ |
||
187 | public function getRequest() { |
||
190 | |||
191 | /** |
||
192 | * {@inheritdoc} |
||
193 | */ |
||
194 | public function getResponse() { |
||
197 | |||
198 | /** |
||
199 | * {@inheritdoc} |
||
200 | */ |
||
201 | public function getServerSide() { |
||
204 | |||
205 | /** |
||
206 | * {@inheritdoc} |
||
207 | */ |
||
208 | public function getUrl() { |
||
211 | |||
212 | /** |
||
213 | * Remove a column. |
||
214 | * |
||
215 | * @param DataTablesColumnInterface $column The column. |
||
216 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
217 | */ |
||
218 | public function removeColumn(DataTablesColumnInterface $column) { |
||
225 | |||
226 | /** |
||
227 | * Set the columns. |
||
228 | * |
||
229 | * @param DataTablesColumnInterface[] $columns The columns. |
||
230 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
231 | */ |
||
232 | private function setColumns(array $columns) { |
||
236 | |||
237 | /** |
||
238 | * Set the method. |
||
239 | * |
||
240 | * @param string $method The method. |
||
241 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
242 | */ |
||
243 | public function setMethod($method) { |
||
247 | |||
248 | /** |
||
249 | * Set the mapping. |
||
250 | * |
||
251 | * @param DataTablesMappingInterface $mapping The mapping |
||
252 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
253 | */ |
||
254 | public function setMapping(DataTablesMappingInterface $mapping) { |
||
258 | |||
259 | /** |
||
260 | * Set the options. |
||
261 | * |
||
262 | * @param DataTablesOptionsInterface $options The options. |
||
263 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
264 | */ |
||
265 | public function setOptions(DataTablesOptionsInterface $options) { |
||
269 | |||
270 | /** |
||
271 | * Set the order. |
||
272 | * |
||
273 | * @param array $order The order. |
||
274 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
275 | */ |
||
276 | public function setOrder(array $order) { |
||
280 | |||
281 | /** |
||
282 | * Set the processing. |
||
283 | * |
||
284 | * @param bool $processing The processing. |
||
285 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
286 | */ |
||
287 | public function setProcessing($processing) { |
||
291 | |||
292 | /** |
||
293 | * Set the provider. |
||
294 | * |
||
295 | * @param DataTablesProviderInterface $provider The provider. |
||
296 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
297 | */ |
||
298 | public function setProvider(DataTablesProviderInterface $provider) { |
||
302 | |||
303 | /** |
||
304 | * {@inheritdoc} |
||
305 | */ |
||
306 | public function setRequest(DataTablesRequestInterface $request) { |
||
310 | |||
311 | /** |
||
312 | * {@inheritdoc} |
||
313 | */ |
||
314 | public function setResponse(DataTablesResponseInterface $response) { |
||
318 | |||
319 | /** |
||
320 | * Set the server side. |
||
321 | * |
||
322 | * @param bool $serverSide The server side. |
||
323 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
324 | */ |
||
325 | public function setServerSide($serverSide) { |
||
329 | |||
330 | /** |
||
331 | * Set the URL. |
||
332 | * |
||
333 | * @param string $url The UTL. |
||
334 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
335 | */ |
||
336 | public function setUrl($url) { |
||
340 | |||
341 | } |
||
342 |