1 | <?php |
||
23 | class DataTablesRequest implements HTTPInterface { |
||
24 | |||
25 | /** |
||
26 | * Columns. |
||
27 | * |
||
28 | * @var array |
||
29 | */ |
||
30 | private $columns; |
||
31 | |||
32 | /** |
||
33 | * Draw. |
||
34 | * |
||
35 | * @var integer |
||
36 | */ |
||
37 | private $draw; |
||
38 | |||
39 | /** |
||
40 | * Length. |
||
41 | * |
||
42 | * @var integer |
||
43 | */ |
||
44 | private $length; |
||
45 | |||
46 | /** |
||
47 | * Order. |
||
48 | * |
||
49 | * @var array |
||
50 | */ |
||
51 | private $order; |
||
52 | |||
53 | /** |
||
54 | * Search. |
||
55 | * |
||
56 | * @var array |
||
57 | */ |
||
58 | private $search; |
||
59 | |||
60 | /** |
||
61 | * Start. |
||
62 | * |
||
63 | * @var integer |
||
64 | */ |
||
65 | private $start; |
||
66 | |||
67 | /** |
||
68 | * Wrapper. |
||
69 | * |
||
70 | * @var DataTablesWrapper |
||
71 | */ |
||
72 | private $wrapper; |
||
73 | |||
74 | /** |
||
75 | * Constructor. |
||
76 | * |
||
77 | * @param DataTableswrapper The wrapper. |
||
78 | * @param Request The request. |
||
79 | */ |
||
80 | public function __construct(DataTablesWrapper $wrapper, Request $request) { |
||
87 | |||
88 | /** |
||
89 | * Get a column. |
||
90 | * |
||
91 | * @param string $name The column name. |
||
92 | * @return array Returns the column in case of success, null otherwise. |
||
93 | */ |
||
94 | public function getColumn($name) { |
||
102 | |||
103 | /** |
||
104 | * Get the columns. |
||
105 | * |
||
106 | * @return array Returns the columns. |
||
107 | */ |
||
108 | public function getColumns() { |
||
111 | |||
112 | /** |
||
113 | * Get the draw. |
||
114 | * |
||
115 | * @return integer Returns the draw. |
||
116 | */ |
||
117 | public function getDraw() { |
||
120 | |||
121 | /** |
||
122 | * Get the length. |
||
123 | * |
||
124 | * @return integer Returns the length. |
||
125 | */ |
||
126 | public function getLength() { |
||
129 | |||
130 | /** |
||
131 | * Get the order. |
||
132 | * |
||
133 | * @return array Returns the order. |
||
134 | */ |
||
135 | public function getOrder() { |
||
138 | |||
139 | /** |
||
140 | * Get the search. |
||
141 | * |
||
142 | * @return array Returns the search. |
||
143 | */ |
||
144 | public function getSearch() { |
||
147 | |||
148 | /** |
||
149 | * Get the start. |
||
150 | * |
||
151 | * @return integer Returns the start. |
||
152 | */ |
||
153 | public function getStart() { |
||
156 | |||
157 | /** |
||
158 | * Get the wrapper. |
||
159 | * |
||
160 | * @return DataTablesWrapper Returns the wrapper. |
||
161 | */ |
||
162 | public function getWrapper() { |
||
165 | |||
166 | /** |
||
167 | * Parse a request. |
||
168 | * |
||
169 | * @param Request $request The request. |
||
170 | * @return DataTablesRequest Returns the DataTables request. |
||
171 | */ |
||
172 | private function parse(Request $request) { |
||
192 | |||
193 | /** |
||
194 | * Set the columns. |
||
195 | * |
||
196 | * @param array $columns The columns. |
||
197 | * @return DataTablesRequest Returns the DataTables request. |
||
198 | */ |
||
199 | private function setColumns(array $columns) { |
||
203 | |||
204 | /** |
||
205 | * Set the draw. |
||
206 | * |
||
207 | * @param integer $draw The draw. |
||
208 | * @return DataTablesRequest Returns the DataTables request. |
||
209 | */ |
||
210 | public function setDraw($draw) { |
||
214 | |||
215 | /** |
||
216 | * Set the length. |
||
217 | * |
||
218 | * @param integer $length The length. |
||
219 | * @return DataTablesRequest Returns the DataTables request. |
||
220 | */ |
||
221 | private function setLength($length) { |
||
225 | |||
226 | /** |
||
227 | * Set the order. |
||
228 | * |
||
229 | * @param array $order The order. |
||
230 | * @return DataTablesRequest Returns the DataTables request. |
||
231 | */ |
||
232 | private function setOrder(array $order) { |
||
236 | |||
237 | /** |
||
238 | * Set the search. |
||
239 | * |
||
240 | * @param array $search The search. |
||
241 | * @return DataTablesRequest Returns the DataTables request. |
||
242 | */ |
||
243 | private function setSearch(array $search) { |
||
247 | |||
248 | /** |
||
249 | * Set the start. |
||
250 | * |
||
251 | * @param integer $start The start. |
||
252 | * @return DataTablesRequest Returns the DataTables request. |
||
253 | */ |
||
254 | private function setStart($start) { |
||
258 | |||
259 | /** |
||
260 | * Set the wrapper. |
||
261 | * |
||
262 | * @param DataTablesWrapper $wrapper The wrapper. |
||
263 | * @return DataTablesRequest Returns the DataTables request. |
||
264 | */ |
||
265 | private function setWrapper(DataTablesWrapper $wrapper) { |
||
269 | |||
270 | } |
||
271 |