1 | <?php |
||
7 | class Aggregate |
||
8 | { |
||
9 | const COUNT = 'COUNT'; |
||
10 | const SUM = 'SUM'; |
||
11 | const AVG = 'AVG'; |
||
12 | const MIN = 'MIN'; |
||
13 | const MAX = 'MAX'; |
||
14 | |||
15 | const ORDERNONE = ''; |
||
16 | const ORDERASC = 'ASC'; |
||
17 | const ORDERDESC = 'DESC'; |
||
18 | |||
19 | private $fieldname; |
||
20 | private $asname; |
||
21 | private $caption; |
||
22 | private $group; |
||
23 | private $decimals; |
||
24 | private $order; |
||
25 | |||
26 | 16 | public function __construct( |
|
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | 1 | public function getFieldname(): string |
|
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | 13 | public function getAsname(): string |
|
66 | |||
67 | /** |
||
68 | * @return string |
||
69 | */ |
||
70 | 1 | public function getCaption(): string |
|
74 | |||
75 | /** |
||
76 | * @return string |
||
77 | */ |
||
78 | 1 | public function getGroup(): string |
|
82 | |||
83 | /** |
||
84 | * @return int |
||
85 | */ |
||
86 | 10 | public function getDecimals(): int |
|
90 | |||
91 | /** |
||
92 | * @return string |
||
93 | */ |
||
94 | 10 | public function getOrder(): string |
|
98 | |||
99 | 12 | public function asArray() : array |
|
110 | |||
111 | /** |
||
112 | * @param DBAL $db |
||
113 | * @return string |
||
114 | */ |
||
115 | 9 | public function getSQL(DBAL $db) : string |
|
121 | |||
122 | 18 | public static function groupTypes() : array |
|
132 | |||
133 | 17 | public static function groupExists(string $group) : bool |
|
137 | } |
||
138 |