| 1 | <?php | ||
| 5 | class ColumnAggregationFunction | ||
| 6 | { | ||
| 7 | /** | ||
| 8 | * @var string | ||
| 9 | */ | ||
| 10 | protected $column; | ||
| 11 | |||
| 12 | /** | ||
| 13 | * @var string | ||
| 14 | */ | ||
| 15 | protected $aggregation_type; | ||
| 16 | |||
| 17 | public static $aggregation_type_sum = 'sum'; | ||
| 18 | |||
| 19 | public static $aggregation_type_avg = 'avg'; | ||
| 20 | |||
| 21 | public static $aggregation_type_min = 'min'; | ||
| 22 | |||
| 23 | public static $aggregation_type_max = 'max'; | ||
| 24 | |||
| 25 | /** | ||
| 26 | * ColumnSummary constructor. | ||
| 27 | * @param $aggregation_type | ||
| 28 | * @param string $column | ||
| 29 | */ | ||
| 30 | public function __construct($aggregation_type, $column) | ||
| 35 | |||
| 36 | |||
| 37 | /** | ||
| 38 | * @return string | ||
| 39 | */ | ||
| 40 | public function getAggregationType() | ||
| 44 | |||
| 45 | |||
| 46 | /** | ||
| 47 | * @param string $value use ColumnAggregationFunction::$aggregation_type_... | ||
| 48 | * @return ColumnSummary | ||
| 49 | */ | ||
| 50 | public function setAggregationType($value) | ||
| 55 | |||
| 56 | /** | ||
| 57 | * @return string | ||
| 58 | */ | ||
| 59 | public function getColumn() | ||
| 63 | } | ||
| 64 |