1 | <?php |
||
21 | class Processor extends ArrayProcessor |
||
22 | { |
||
23 | use HasSnakeAliases; |
||
24 | |||
25 | /** |
||
26 | * Return comparable value from a row. |
||
27 | * |
||
28 | * @param mixed $row |
||
29 | * @param string $column |
||
30 | * @return int|string |
||
31 | */ |
||
32 | 21 | protected function field($row, $column) |
|
36 | |||
37 | /** |
||
38 | * Slice rows, like PHP function array_slice(). |
||
39 | * |
||
40 | * @param array[]|IdiormResultSet $rows |
||
41 | * @param int $offset |
||
42 | * @param null|int $length |
||
43 | * @return mixed |
||
44 | */ |
||
45 | 21 | protected function slice($rows, $offset, $length = null) |
|
51 | |||
52 | /** |
||
53 | * Reverse rows, like PHP function array_reverse(). |
||
54 | * |
||
55 | * @param array[]|IdiormResultSet $rows |
||
56 | * @return mixed |
||
57 | */ |
||
58 | 8 | protected function reverse($rows) |
|
64 | |||
65 | /** |
||
66 | * Format result. |
||
67 | * |
||
68 | * @param array[]|IdiormResultSet $rows |
||
69 | * @param array $meta |
||
70 | * @param Query $query |
||
71 | * @return PaginationResult |
||
72 | */ |
||
73 | 21 | protected function defaultFormat($rows, array $meta, Query $query) |
|
77 | |||
78 | /** |
||
79 | * Drop table prefix on column name. |
||
80 | * |
||
81 | * @param string $column |
||
82 | * @return string |
||
83 | */ |
||
84 | 21 | protected static function dropTablePrefix($column) |
|
90 | } |
||
91 |