1 | <?php |
||
22 | class DataTablesResponse implements DataTablesResponseInterface, JsonSerializable { |
||
23 | |||
24 | /** |
||
25 | * Data. |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | private $data; |
||
30 | |||
31 | /** |
||
32 | * Draw. |
||
33 | * |
||
34 | * @var integer |
||
35 | */ |
||
36 | private $draw; |
||
37 | |||
38 | /** |
||
39 | * Error. |
||
40 | * |
||
41 | * @var string |
||
42 | */ |
||
43 | private $error; |
||
44 | |||
45 | /** |
||
46 | * Records filtered. |
||
47 | * |
||
48 | * @var integer |
||
49 | */ |
||
50 | private $recordsFiltered; |
||
51 | |||
52 | /** |
||
53 | * Records total. |
||
54 | * |
||
55 | * @var integer |
||
56 | */ |
||
57 | private $recordsTotal; |
||
58 | |||
59 | /** |
||
60 | * Wrapper. |
||
61 | * |
||
62 | * @var DataTablesWrapper |
||
63 | */ |
||
64 | private $wrapper; |
||
65 | |||
66 | /** |
||
67 | * Constructor. |
||
68 | */ |
||
69 | protected function __construct(DataTablesWrapper $wrapper, DataTablesRequest $request) { |
||
74 | |||
75 | /** |
||
76 | * Add a row. |
||
77 | * |
||
78 | * @return DataTablesResponse Returns the DataTables response. |
||
79 | */ |
||
80 | public function addRow() { |
||
95 | |||
96 | /** |
||
97 | * Get the data. |
||
98 | * |
||
99 | * @return array Returns the data. |
||
100 | */ |
||
101 | public function getData() { |
||
104 | |||
105 | /** |
||
106 | * Get the draw |
||
107 | * |
||
108 | * @return integer Returns the draw. |
||
109 | */ |
||
110 | public function getDraw() { |
||
113 | |||
114 | /** |
||
115 | * Get the error. |
||
116 | * |
||
117 | * @return string Returns the error. |
||
118 | */ |
||
119 | public function getError() { |
||
122 | |||
123 | /** |
||
124 | * Get the records filtered. |
||
125 | * |
||
126 | * @return integer The records filtered. |
||
127 | */ |
||
128 | public function getRecordsFiltered() { |
||
131 | |||
132 | /** |
||
133 | * Get the records total. |
||
134 | * |
||
135 | * @return integer Returns the records total. |
||
136 | */ |
||
137 | public function getRecordsTotal() { |
||
140 | |||
141 | /** |
||
142 | * Get the wrapper. |
||
143 | * |
||
144 | * @return DataTablesWrapper Returns the wrapper. |
||
145 | */ |
||
146 | public function getWrapper() { |
||
149 | |||
150 | /** |
||
151 | * {@inheritdoc} |
||
152 | */ |
||
153 | public function jsonSerialize() { |
||
156 | |||
157 | /** |
||
158 | * Create a DataTables response instance. |
||
159 | * |
||
160 | * @param DataTablesWrapper $wrapper The wrapper. |
||
161 | * @param DataTablesRequest $request The request. |
||
162 | * @return DataTablesResponse Returns the DataTables response. |
||
163 | */ |
||
164 | public static function parse(DataTablesWrapper $wrapper, DataTablesRequest $request) { |
||
174 | |||
175 | /** |
||
176 | * Set the data. |
||
177 | * |
||
178 | * @param array $data The data. |
||
179 | * @return DataTablesResponse Returns this DataTables response. |
||
180 | */ |
||
181 | protected function setData(array $data) { |
||
185 | |||
186 | /** |
||
187 | * Set the draw. |
||
188 | * |
||
189 | * @param integer $draw The draw. |
||
190 | * @return DataTablesResponse Returns the DataTables response. |
||
191 | */ |
||
192 | protected function setDraw($draw) { |
||
196 | |||
197 | /** |
||
198 | * Set the error. |
||
199 | * |
||
200 | * @param string $error The error. |
||
201 | * @return DataTablesResponse Returns this DataTables response. |
||
202 | */ |
||
203 | public function setError($error) { |
||
207 | |||
208 | /** |
||
209 | * Set the records filtered. |
||
210 | * |
||
211 | * @param integer $recordsFiltered The records filtered. |
||
212 | * @return DataTablesResponse Returns this DataTables response. |
||
213 | */ |
||
214 | public function setRecordsFiltered($recordsFiltered) { |
||
218 | |||
219 | /** |
||
220 | * Set the records total. |
||
221 | * |
||
222 | * @param integer $recordsTotal The records total. |
||
223 | * @return DataTablesResponse Returns this DataTables response. |
||
224 | */ |
||
225 | public function setRecordsTotal($recordsTotal) { |
||
229 | |||
230 | /** |
||
231 | * Set a row value. |
||
232 | * |
||
233 | * @param string $name The column name. |
||
234 | * @param string $value The column value. |
||
235 | * @return DataTablesResponse Returns this DataTables response. |
||
236 | */ |
||
237 | public function setRow($name, $value) { |
||
257 | |||
258 | /** |
||
259 | * Set the wrapper. |
||
260 | * |
||
261 | * @param DataTablesWrapper $wrapper The wrapper. |
||
262 | * @return DataTablesResponse Returns this DataTables request. |
||
263 | */ |
||
264 | protected function setWrapper(DataTablesWrapper $wrapper) { |
||
268 | |||
269 | /** |
||
270 | * Convert into an array representing this instance. |
||
271 | * |
||
272 | * @return array Returns an array representing this instance. |
||
273 | */ |
||
274 | public function toArray() { |
||
287 | |||
288 | } |
||
289 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.