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() { |
||
77 | |||
78 | /** |
||
79 | * Get a column. |
||
80 | * |
||
81 | * @param string $name The column name. |
||
82 | * @return array Returns the column in case of success, null otherwise. |
||
83 | */ |
||
84 | public function getColumn($name) { |
||
94 | |||
95 | /** |
||
96 | * Get the columns. |
||
97 | * |
||
98 | * @return array Returns the columns. |
||
99 | */ |
||
100 | public function getColumns() { |
||
103 | |||
104 | /** |
||
105 | * Get the draw. |
||
106 | * |
||
107 | * @return integer Returns the draw. |
||
108 | */ |
||
109 | public final function getDraw() { |
||
112 | |||
113 | /** |
||
114 | * Get the length. |
||
115 | * |
||
116 | * @return integer Returns the length. |
||
117 | */ |
||
118 | public function getLength() { |
||
121 | |||
122 | /** |
||
123 | * Get the order. |
||
124 | * |
||
125 | * @return array Returns the order. |
||
126 | */ |
||
127 | public function getOrder() { |
||
130 | |||
131 | /** |
||
132 | * Get the search. |
||
133 | * |
||
134 | * @return array Returns the search. |
||
135 | */ |
||
136 | public function getSearch() { |
||
139 | |||
140 | /** |
||
141 | * Get the start. |
||
142 | * |
||
143 | * @return integer Returns the start. |
||
144 | */ |
||
145 | public function getStart() { |
||
148 | |||
149 | /** |
||
150 | * Create a DataTables request. |
||
151 | * |
||
152 | * @param Request $request The request. |
||
153 | * @return DataTablesRequest Returns a DataTables request. |
||
154 | */ |
||
155 | public static function newInstance(Request $request) { |
||
178 | |||
179 | /** |
||
180 | * Set the columns. |
||
181 | * |
||
182 | * @param array $columns The columns. |
||
183 | * @return DataTablesRequest Returns the DataTables request. |
||
184 | */ |
||
185 | private function setColumns(array $columns) { |
||
189 | |||
190 | /** |
||
191 | * Set the draw. |
||
192 | * |
||
193 | * @param integer $draw The draw. |
||
194 | * @return DataTablesRequest Returns the DataTables request. |
||
195 | */ |
||
196 | public function setDraw($draw) { |
||
200 | |||
201 | /** |
||
202 | * Set the length. |
||
203 | * |
||
204 | * @param integer $length The length. |
||
205 | * @return DataTablesRequest Returns the DataTables request. |
||
206 | */ |
||
207 | private function setLength($length) { |
||
211 | |||
212 | /** |
||
213 | * Set the order. |
||
214 | * |
||
215 | * @param array $order The order. |
||
216 | * @return DataTablesRequest Returns the DataTables request. |
||
217 | */ |
||
218 | private function setOrder(array $order) { |
||
222 | |||
223 | /** |
||
224 | * Set the search. |
||
225 | * |
||
226 | * @param array $search The search. |
||
227 | * @return DataTablesRequest Returns the DataTables request. |
||
228 | */ |
||
229 | private function setSearch(array $search) { |
||
233 | |||
234 | /** |
||
235 | * Set the start. |
||
236 | * |
||
237 | * @param integer $start The start. |
||
238 | * @return DataTablesRequest Returns the DataTables request. |
||
239 | */ |
||
240 | private function setStart($start) { |
||
244 | |||
245 | } |
||
246 |