1 | <?php |
||
7 | class GetData implements GetDataInterface |
||
8 | { |
||
9 | protected $value; |
||
10 | |||
11 | public function __construct($value) |
||
15 | |||
16 | /** |
||
17 | * get all the data in the table as an array |
||
18 | */ |
||
19 | protected function getAllData() |
||
23 | |||
24 | /** |
||
25 | * Reverse the json data |
||
26 | * @param [int] $limit |
||
|
|||
27 | */ |
||
28 | protected function DESC($limit = NULL) |
||
37 | |||
38 | /** |
||
39 | * Return data in descending order |
||
40 | * @param [int] $limit |
||
41 | */ |
||
42 | public function allDESC($limit = NULL) |
||
46 | |||
47 | /** |
||
48 | * Get all data in json_decoded format |
||
49 | */ |
||
50 | public function all() |
||
54 | |||
55 | /** |
||
56 | * Get the actual fetched row and return an array |
||
57 | */ |
||
58 | public function toArray() |
||
62 | |||
63 | /** |
||
64 | * Convert the fetched row to json |
||
65 | */ |
||
66 | public function toJson($all = false) |
||
67 | { |
||
68 | return $all ? json_encode($this->getAllData()) : json_encode($this->toArray()); |
||
69 | } |
||
70 | |||
71 | /** |
||
72 | * Convert the fetched row to json |
||
73 | */ |
||
74 | public function toJsonDecode() |
||
78 | |||
79 | /** |
||
80 | * Get the output of the first jsondecoded element |
||
81 | */ |
||
82 | public function first() |
||
86 | |||
87 | /** |
||
88 | * Get the count of the fetch element |
||
89 | */ |
||
90 | public function getCount() |
||
94 | } |
This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.