1 | <?php |
||
27 | class DataTablesRequest implements DataTablesRequestInterface, HttpInterface { |
||
28 | |||
29 | use DataTablesWrapperTrait { |
||
30 | setWrapper as public; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Columns. |
||
35 | * |
||
36 | * @var DataTablesColumnInterface[] |
||
37 | */ |
||
38 | private $columns; |
||
39 | |||
40 | /** |
||
41 | * Draw. |
||
42 | * |
||
43 | * @var int |
||
44 | */ |
||
45 | private $draw; |
||
46 | |||
47 | /** |
||
48 | * Length. |
||
49 | * |
||
50 | * @var int |
||
51 | */ |
||
52 | private $length; |
||
53 | |||
54 | /** |
||
55 | * Order. |
||
56 | * |
||
57 | * @var DataTablesOrderInterface[] |
||
58 | */ |
||
59 | private $order; |
||
60 | |||
61 | /** |
||
62 | * Query. |
||
63 | * |
||
64 | * @var ParameterBag |
||
65 | */ |
||
66 | private $query; |
||
67 | |||
68 | /** |
||
69 | * Request. |
||
70 | * |
||
71 | * @var ParameterBag |
||
72 | */ |
||
73 | private $request; |
||
74 | |||
75 | /** |
||
76 | * Search. |
||
77 | * |
||
78 | * @var DataTablesSearchInterface|null |
||
79 | */ |
||
80 | private $search; |
||
81 | |||
82 | /** |
||
83 | * Start. |
||
84 | * |
||
85 | * @var int |
||
86 | */ |
||
87 | private $start; |
||
88 | |||
89 | /** |
||
90 | * Constructor. |
||
91 | */ |
||
92 | public function __construct() { |
||
101 | |||
102 | /** |
||
103 | * {@inheritDoc} |
||
104 | */ |
||
105 | public function getColumn(string $data): ?DataTablesColumnInterface { |
||
113 | |||
114 | /** |
||
115 | * {@inheritDoc} |
||
116 | */ |
||
117 | public function getColumns(): array { |
||
120 | |||
121 | /** |
||
122 | * {@inheritDoc} |
||
123 | */ |
||
124 | public function getDraw(): int { |
||
127 | |||
128 | /** |
||
129 | * {@inheritDoc} |
||
130 | */ |
||
131 | public function getLength(): int { |
||
134 | |||
135 | /** |
||
136 | * {@inheritDoc} |
||
137 | */ |
||
138 | public function getOrder(): array { |
||
141 | |||
142 | /** |
||
143 | * {@inheritDoc} |
||
144 | */ |
||
145 | public function getQuery(): ParameterBag { |
||
148 | |||
149 | /** |
||
150 | * {@inheritDoc} |
||
151 | */ |
||
152 | public function getRequest(): ParameterBag { |
||
155 | |||
156 | /** |
||
157 | * {@inheritDoc} |
||
158 | */ |
||
159 | public function getSearch(): ?DataTablesSearchInterface { |
||
162 | |||
163 | /** |
||
164 | * {@inheritDoc} |
||
165 | */ |
||
166 | public function getStart(): int { |
||
169 | |||
170 | /** |
||
171 | * Set the columns. |
||
172 | * |
||
173 | * @param DataTablesColumnInterface[] $columns The columns. |
||
174 | * @return DataTablesRequestInterface Returns this request. |
||
175 | */ |
||
176 | public function setColumns(array $columns): DataTablesRequestInterface { |
||
180 | |||
181 | /** |
||
182 | * Set the draw. |
||
183 | * |
||
184 | * @param int $draw The draw. |
||
185 | * @return DataTablesRequestInterface Returns this request. |
||
186 | */ |
||
187 | public function setDraw(int $draw): DataTablesRequestInterface { |
||
191 | |||
192 | /** |
||
193 | * Set the length. |
||
194 | * |
||
195 | * @param int $length The length. |
||
196 | * @return DataTablesRequestInterface Returns this request. |
||
197 | */ |
||
198 | public function setLength(int $length): DataTablesRequestInterface { |
||
202 | |||
203 | /** |
||
204 | * Set the order. |
||
205 | * |
||
206 | * @param DataTablesOrderInterface[] $order The order. |
||
207 | * @return DataTablesRequestInterface Returns this request. |
||
208 | */ |
||
209 | public function setOrder(array $order): DataTablesRequestInterface { |
||
213 | |||
214 | /** |
||
215 | * Set the request. |
||
216 | * |
||
217 | * @param ParameterBag $query The query. |
||
218 | * @return DataTablesRequestInterface Returns this request. |
||
219 | */ |
||
220 | protected function setQuery(ParameterBag $query): DataTablesRequestInterface { |
||
224 | |||
225 | /** |
||
226 | * Set the request. |
||
227 | * |
||
228 | * @param ParameterBag $request The request. |
||
229 | * @return DataTablesRequestInterface Returns this request. |
||
230 | */ |
||
231 | protected function setRequest(ParameterBag $request): DataTablesRequestInterface { |
||
235 | |||
236 | /** |
||
237 | * Set the search. |
||
238 | * |
||
239 | * @param DataTablesSearchInterface|null $search The search. |
||
240 | * @return DataTablesRequestInterface Returns this request. |
||
241 | */ |
||
242 | public function setSearch(?DataTablesSearchInterface $search): DataTablesRequestInterface { |
||
246 | |||
247 | /** |
||
248 | * Set the start. |
||
249 | * |
||
250 | * @param int $start The start. |
||
251 | * @return DataTablesRequestInterface Returns this request. |
||
252 | */ |
||
253 | public function setStart(int $start): DataTablesRequestInterface { |
||
257 | } |
||
258 |