1 | <?php |
||
23 | class DataTablesRequest implements HTTPInterface { |
||
24 | |||
25 | /** |
||
26 | * Columns. |
||
27 | * |
||
28 | * @var DataTablesColumn[] |
||
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 DataTablesOrder[] |
||
50 | */ |
||
51 | private $order; |
||
52 | |||
53 | /** |
||
54 | * Search. |
||
55 | * |
||
56 | * @var DataTablesSearch |
||
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 | protected function __construct() { |
||
84 | |||
85 | /** |
||
86 | * Get a column. |
||
87 | * |
||
88 | * @param string $data The column data. |
||
89 | * @return array Returns the column in case of success, null otherwise. |
||
90 | */ |
||
91 | public function getColumn($data) { |
||
99 | |||
100 | /** |
||
101 | * Get the columns. |
||
102 | * |
||
103 | * @return DataTablesColumn[] Returns the columns. |
||
104 | */ |
||
105 | public function getColumns() { |
||
108 | |||
109 | /** |
||
110 | * Get the draw. |
||
111 | * |
||
112 | * @return integer Returns the draw. |
||
113 | */ |
||
114 | public function getDraw() { |
||
117 | |||
118 | /** |
||
119 | * Get the length. |
||
120 | * |
||
121 | * @return integer Returns the length. |
||
122 | */ |
||
123 | public function getLength() { |
||
126 | |||
127 | /** |
||
128 | * Get the order. |
||
129 | * |
||
130 | * @return DataTablesOrder[] Returns the order. |
||
131 | */ |
||
132 | public function getOrder() { |
||
135 | |||
136 | /** |
||
137 | * Get the search. |
||
138 | * |
||
139 | * @return DatTablesSearch Returns the search. |
||
140 | */ |
||
141 | public function getSearch() { |
||
144 | |||
145 | /** |
||
146 | * Get the start. |
||
147 | * |
||
148 | * @return integer Returns the start. |
||
149 | */ |
||
150 | public function getStart() { |
||
153 | |||
154 | /** |
||
155 | * Get the wrapper. |
||
156 | * |
||
157 | * @return DataTablesWrapper Returns the wrapper. |
||
158 | */ |
||
159 | public function getWrapper() { |
||
162 | |||
163 | /** |
||
164 | * Parse a request. |
||
165 | * |
||
166 | * @param DataTablesWrapper $wrapper The wrapper. |
||
167 | * @param Request $request The request. |
||
168 | * @return DataTablesRequest Returns the DataTables request. |
||
169 | */ |
||
170 | public static function parse(DataTablesWrapper $wrapper, Request $request) { |
||
199 | |||
200 | /** |
||
201 | * Set the columns. |
||
202 | * |
||
203 | * @param DataTablesColumn[] $columns The columns. |
||
204 | * @return DataTablesRequest Returns this DataTables request. |
||
205 | */ |
||
206 | protected function setColumns($columns) { |
||
210 | |||
211 | /** |
||
212 | * Set the draw. |
||
213 | * |
||
214 | * @param integer $draw The draw. |
||
215 | * @return DataTablesRequest Returns this DataTables request. |
||
216 | */ |
||
217 | protected function setDraw($draw) { |
||
221 | |||
222 | /** |
||
223 | * Set the length. |
||
224 | * |
||
225 | * @param integer $length The length. |
||
226 | * @return DataTablesRequest Returns this DataTables request. |
||
227 | */ |
||
228 | protected function setLength($length) { |
||
232 | |||
233 | /** |
||
234 | * Set the order. |
||
235 | * |
||
236 | * @param DataTablesOrder[] $order The order. |
||
237 | * @return DataTablesRequest Returns this DataTables request. |
||
238 | */ |
||
239 | protected function setOrder($order) { |
||
243 | |||
244 | /** |
||
245 | * Set the search. |
||
246 | * |
||
247 | * @param DataTablesSearch $search The search. |
||
248 | * @return DataTablesRequest Returns this DataTables request. |
||
249 | */ |
||
250 | protected function setSearch(DataTablesSearch $search) { |
||
254 | |||
255 | /** |
||
256 | * Set the start. |
||
257 | * |
||
258 | * @param integer $start The start. |
||
259 | * @return DataTablesRequest Returns this DataTables request. |
||
260 | */ |
||
261 | protected function setStart($start) { |
||
265 | |||
266 | /** |
||
267 | * Set the wrapper. |
||
268 | * |
||
269 | * @param DataTablesWrapper $wrapper The wrapper. |
||
270 | * @return DataTablesRequest Returns this DataTables request. |
||
271 | */ |
||
272 | protected function setWrapper(DataTablesWrapper $wrapper) { |
||
276 | |||
277 | } |
||
278 |