1 | <?php |
||
23 | final class DataTablesRequest { |
||
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 | * Constructor. |
||
69 | */ |
||
70 | private function __construct() { |
||
75 | |||
76 | /** |
||
77 | * Get a column. |
||
78 | * |
||
79 | * @param string $name The column name. |
||
80 | * @return array Returns the column in case of success, null otherwise. |
||
81 | */ |
||
82 | public function getColumn($name) { |
||
91 | |||
92 | /** |
||
93 | * Get the columns. |
||
94 | * |
||
95 | * @return array Returns the columns. |
||
96 | */ |
||
97 | public function getColumns() { |
||
100 | |||
101 | /** |
||
102 | * Get the draw. |
||
103 | * |
||
104 | * @return integer Returns the draw. |
||
105 | */ |
||
106 | public function getDraw() { |
||
109 | |||
110 | /** |
||
111 | * Get the length. |
||
112 | * |
||
113 | * @return integer Returns the length. |
||
114 | */ |
||
115 | public function getLength() { |
||
118 | |||
119 | /** |
||
120 | * Get the order. |
||
121 | * |
||
122 | * @return array Returns the order. |
||
123 | */ |
||
124 | public function getOrder() { |
||
127 | |||
128 | /** |
||
129 | * Get the search. |
||
130 | * |
||
131 | * @return array Returns the search. |
||
132 | */ |
||
133 | public function getSearch() { |
||
136 | |||
137 | /** |
||
138 | * Get the start. |
||
139 | * |
||
140 | * @return integer Returns the start. |
||
141 | */ |
||
142 | public function getStart() { |
||
145 | |||
146 | /** |
||
147 | * Create a DataTables request. |
||
148 | * |
||
149 | * @param Request $request The request. |
||
150 | * @return DataTablesRequest Returns a DataTables request. |
||
151 | */ |
||
152 | public static function newInstance(Request $request) { |
||
175 | |||
176 | /** |
||
177 | * Set the columns. |
||
178 | * |
||
179 | * @param array $columns The columns. |
||
180 | * @return DataTablesRequest Returns the DataTables request. |
||
181 | */ |
||
182 | private function setColumns(array $columns) { |
||
186 | |||
187 | /** |
||
188 | * Set the draw. |
||
189 | * |
||
190 | * @param integer $draw The draw. |
||
191 | * @return DataTablesRequest Returns the DataTables request. |
||
192 | */ |
||
193 | public function setDraw($draw) { |
||
197 | |||
198 | /** |
||
199 | * Set the length. |
||
200 | * |
||
201 | * @param integer $length The length. |
||
202 | * @return DataTablesRequest Returns the DataTables request. |
||
203 | */ |
||
204 | private function setLength($length) { |
||
208 | |||
209 | /** |
||
210 | * Set the order. |
||
211 | * |
||
212 | * @param array $order The order. |
||
213 | * @return DataTablesRequest Returns the DataTables request. |
||
214 | */ |
||
215 | private function setOrder(array $order) { |
||
219 | |||
220 | /** |
||
221 | * Set the search. |
||
222 | * |
||
223 | * @param array $search The search. |
||
224 | * @return DataTablesRequest Returns the DataTables request. |
||
225 | */ |
||
226 | private function setSearch(array $search) { |
||
230 | |||
231 | /** |
||
232 | * Set the start. |
||
233 | * |
||
234 | * @param integer $start The start. |
||
235 | * @return DataTablesRequest Returns the DataTables request. |
||
236 | */ |
||
237 | private function setStart($start) { |
||
241 | |||
242 | } |
||
243 |