1 | <?php |
||
24 | class DataTablesWrapper implements DataTablesWrapperInterface, HTTPInterface { |
||
25 | |||
26 | use UserTrait { |
||
27 | setUser as public; |
||
28 | } |
||
29 | |||
30 | /** |
||
31 | * Columns. |
||
32 | * |
||
33 | * @var DataTablesColumnInterface[] |
||
34 | */ |
||
35 | private $columns; |
||
36 | |||
37 | /** |
||
38 | * Mapping. |
||
39 | * |
||
40 | * @var DataTablesMappingInterface |
||
41 | */ |
||
42 | private $mapping; |
||
43 | |||
44 | /** |
||
45 | * Method. |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | private $method; |
||
50 | |||
51 | /** |
||
52 | * Options. |
||
53 | * |
||
54 | * @var DataTablesOptionsInterface |
||
55 | */ |
||
56 | private $options; |
||
57 | |||
58 | /** |
||
59 | * Processing. |
||
60 | * |
||
61 | * @var bool |
||
62 | */ |
||
63 | private $processing; |
||
64 | |||
65 | /** |
||
66 | * Provider. |
||
67 | * |
||
68 | * @var DataTablesProviderInterface |
||
69 | */ |
||
70 | private $provider; |
||
71 | |||
72 | /** |
||
73 | * Request. |
||
74 | * |
||
75 | * @var DataTablesRequestInterface |
||
76 | */ |
||
77 | private $request; |
||
78 | |||
79 | /** |
||
80 | * Response. |
||
81 | * |
||
82 | * @var DataTablesResponseInterface |
||
83 | */ |
||
84 | private $response; |
||
85 | |||
86 | /** |
||
87 | * Server side. |
||
88 | * |
||
89 | * @var bool |
||
90 | */ |
||
91 | private $serverSide; |
||
92 | |||
93 | /** |
||
94 | * URL. |
||
95 | * |
||
96 | * @var string |
||
97 | */ |
||
98 | private $url; |
||
99 | |||
100 | /** |
||
101 | * Constructor. |
||
102 | */ |
||
103 | public function __construct() { |
||
110 | |||
111 | /** |
||
112 | * {@inheritDoc} |
||
113 | */ |
||
114 | public function addColumn(DataTablesColumnInterface $column) { |
||
121 | |||
122 | /** |
||
123 | * {@inheritDoc} |
||
124 | */ |
||
125 | public function getColumn($data) { |
||
131 | |||
132 | /** |
||
133 | * {@inheritDoc} |
||
134 | */ |
||
135 | public function getColumns() { |
||
138 | |||
139 | /** |
||
140 | * {@inheritDoc} |
||
141 | */ |
||
142 | public function getMapping() { |
||
145 | |||
146 | /** |
||
147 | * {@inheritDoc} |
||
148 | */ |
||
149 | public function getMethod() { |
||
152 | |||
153 | /** |
||
154 | * {@inheritDoc} |
||
155 | */ |
||
156 | public function getOptions() { |
||
159 | |||
160 | /** |
||
161 | * {@inheritDoc} |
||
162 | */ |
||
163 | public function getProcessing() { |
||
166 | |||
167 | /** |
||
168 | * {@inheritDoc} |
||
169 | */ |
||
170 | public function getProvider() { |
||
173 | |||
174 | /** |
||
175 | * {@inheritDoc} |
||
176 | */ |
||
177 | public function getRequest() { |
||
180 | |||
181 | /** |
||
182 | * {@inheritDoc} |
||
183 | */ |
||
184 | public function getResponse() { |
||
187 | |||
188 | /** |
||
189 | * {@inheritDoc} |
||
190 | */ |
||
191 | public function getServerSide() { |
||
194 | |||
195 | /** |
||
196 | * {@inheritDoc} |
||
197 | */ |
||
198 | public function getUrl() { |
||
201 | |||
202 | /** |
||
203 | * Remove a column. |
||
204 | * |
||
205 | * @param DataTablesColumnInterface $column The column. |
||
206 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
207 | */ |
||
208 | public function removeColumn(DataTablesColumnInterface $column) { |
||
215 | |||
216 | /** |
||
217 | * Set the columns. |
||
218 | * |
||
219 | * @param DataTablesColumnInterface[] $columns The columns. |
||
220 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
221 | */ |
||
222 | private function setColumns(array $columns) { |
||
226 | |||
227 | /** |
||
228 | * Set the mapping. |
||
229 | * |
||
230 | * @param DataTablesMappingInterface $mapping The mapping |
||
231 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
232 | */ |
||
233 | public function setMapping(DataTablesMappingInterface $mapping) { |
||
237 | |||
238 | /** |
||
239 | * Set the method. |
||
240 | * |
||
241 | * @param string $method The method. |
||
242 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
243 | */ |
||
244 | public function setMethod($method) { |
||
248 | |||
249 | /** |
||
250 | * Set the options. |
||
251 | * |
||
252 | * @param DataTablesOptionsInterface $options The options. |
||
253 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
254 | */ |
||
255 | public function setOptions(DataTablesOptionsInterface $options) { |
||
259 | |||
260 | /** |
||
261 | * Set the processing. |
||
262 | * |
||
263 | * @param bool $processing The processing. |
||
264 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
265 | */ |
||
266 | public function setProcessing($processing) { |
||
270 | |||
271 | /** |
||
272 | * Set the provider. |
||
273 | * |
||
274 | * @param DataTablesProviderInterface $provider The provider. |
||
275 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
276 | */ |
||
277 | public function setProvider(DataTablesProviderInterface $provider) { |
||
281 | |||
282 | /** |
||
283 | * {@inheritDoc} |
||
284 | */ |
||
285 | public function setRequest(DataTablesRequestInterface $request) { |
||
289 | |||
290 | /** |
||
291 | * {@inheritDoc} |
||
292 | */ |
||
293 | public function setResponse(DataTablesResponseInterface $response) { |
||
297 | |||
298 | /** |
||
299 | * Set the server side. |
||
300 | * |
||
301 | * @param bool $serverSide The server side. |
||
302 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
303 | */ |
||
304 | public function setServerSide($serverSide) { |
||
308 | |||
309 | /** |
||
310 | * Set the URL. |
||
311 | * |
||
312 | * @param string $url The UTL. |
||
313 | * @return DataTablesWrapperInterface Returns this wrapper. |
||
314 | */ |
||
315 | public function setUrl($url) { |
||
319 | } |
||
320 |