1 | <?php |
||
26 | final class DataTablesWrapper { |
||
27 | |||
28 | /** |
||
29 | * Columns. |
||
30 | * |
||
31 | * @var DataTablesColumn[] |
||
32 | */ |
||
33 | private $columns; |
||
34 | |||
35 | /** |
||
36 | * Mapping. |
||
37 | * |
||
38 | * @var DataTablesMapping |
||
39 | */ |
||
40 | private $mapping; |
||
41 | |||
42 | /** |
||
43 | * Method. |
||
44 | * |
||
45 | * @var string |
||
46 | */ |
||
47 | private $method; |
||
48 | |||
49 | /** |
||
50 | * Order. |
||
51 | * |
||
52 | * @var array |
||
53 | */ |
||
54 | private $order; |
||
55 | |||
56 | /** |
||
57 | * Processing. |
||
58 | * |
||
59 | * @var boolean |
||
60 | */ |
||
61 | private $processing; |
||
62 | |||
63 | /** |
||
64 | * Request. |
||
65 | * |
||
66 | * @var DataTablesRequest |
||
67 | */ |
||
68 | private $request; |
||
69 | |||
70 | /** |
||
71 | * Response. |
||
72 | * |
||
73 | * @var DataTablesResponse |
||
74 | */ |
||
75 | private $response; |
||
76 | |||
77 | /** |
||
78 | * Route. |
||
79 | * |
||
80 | * @var string |
||
81 | */ |
||
82 | private $route; |
||
83 | |||
84 | /** |
||
85 | * Server side. |
||
86 | * |
||
87 | * @var boolean |
||
88 | */ |
||
89 | private $serverSide; |
||
90 | |||
91 | /** |
||
92 | * Constructor. |
||
93 | * |
||
94 | * @param string $method The method. |
||
95 | * @param string $route The route. |
||
96 | * @param string $prefix The prefix. |
||
97 | */ |
||
98 | public function __construct($method, $route, $prefix) { |
||
109 | |||
110 | /** |
||
111 | * Get the columns. |
||
112 | * |
||
113 | * @return DataTablesColumn[] Returns the columns. |
||
114 | */ |
||
115 | public function getColumns() { |
||
118 | |||
119 | /** |
||
120 | * Get the mapping. |
||
121 | * |
||
122 | * @return DataTablesMapping The mapping. |
||
123 | */ |
||
124 | public function getMapping() { |
||
127 | |||
128 | /** |
||
129 | * Get the method. |
||
130 | * |
||
131 | * @return string Returns the method. |
||
132 | */ |
||
133 | public function getMethod() { |
||
136 | |||
137 | /** |
||
138 | * Get the order. |
||
139 | * |
||
140 | * @return array Returns the order. |
||
141 | */ |
||
142 | public function getOrder() { |
||
145 | |||
146 | /** |
||
147 | * Get the processing. |
||
148 | * |
||
149 | * @return boolean Returns the processing. |
||
150 | */ |
||
151 | public function getProcessing() { |
||
154 | |||
155 | /** |
||
156 | * Get the request. |
||
157 | * |
||
158 | * @return DataTablesRequest The request. |
||
159 | */ |
||
160 | public function getRequest() { |
||
163 | |||
164 | /** |
||
165 | * Get the response. |
||
166 | * |
||
167 | * @return DataTablesResponse Returns the response. |
||
168 | */ |
||
169 | public function getResponse() { |
||
172 | |||
173 | /** |
||
174 | * Get the route. |
||
175 | * |
||
176 | * @return string Returns the reoute. |
||
177 | */ |
||
178 | public function getRoute() { |
||
181 | |||
182 | /** |
||
183 | * Get the server side. |
||
184 | * |
||
185 | * @return boolean Returns the server side. |
||
186 | */ |
||
187 | public function getServerSide() { |
||
190 | |||
191 | /** |
||
192 | * Set the columns. |
||
193 | * |
||
194 | * @param DataTablesColumn[] $columns The columns. |
||
195 | * @return DataTablesWrapper Returns the DataTables wrapper. |
||
196 | */ |
||
197 | private function setColumns(array $columns) { |
||
201 | |||
202 | /** |
||
203 | * Set the method. |
||
204 | * |
||
205 | * @param string $method The method. |
||
206 | * @return DataTablesWrapper Returns the DataTables wrapper. |
||
207 | */ |
||
208 | private function setMethod($method) { |
||
219 | |||
220 | /** |
||
221 | * Set the order. |
||
222 | * |
||
223 | * @param array $order The order. |
||
224 | * @return DataTablesWrapper Returns the DataTables wrapper. |
||
225 | */ |
||
226 | public function setOrder(array $order) { |
||
230 | |||
231 | /** |
||
232 | * Set the processing. |
||
233 | * |
||
234 | * @param boolean $processing The processing. |
||
235 | * @return DataTablesWrapper Returns the DataTables wrapper. |
||
236 | */ |
||
237 | public function setProcessing($processing) { |
||
249 | |||
250 | /** |
||
251 | * Set the route. |
||
252 | * |
||
253 | * @param string $route The route. |
||
254 | * @return DataTablesWrapper Returns the DataTables wrapper. |
||
255 | */ |
||
256 | private function setRoute($route) { |
||
260 | |||
261 | /** |
||
262 | * Set the server side. |
||
263 | * |
||
264 | * @param boolean $serverSide The server side. |
||
265 | * @return DataTablesWrapper Returns the DataTables wrapper. |
||
266 | */ |
||
267 | public function setServerSide($serverSide) { |
||
279 | |||
280 | } |
||
281 |
As per the PSR-2 coding standard, there must not be a space in front of the colon in case statements.
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.