| 1 | <?php |
||
| 12 | class ColumnSummary |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $column; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | protected $method; |
||
| 23 | |||
| 24 | public static $method_sum = 'sum'; |
||
| 25 | |||
| 26 | public static $method_avg = 'avg'; |
||
| 27 | |||
| 28 | public static $method_min = 'min'; |
||
| 29 | |||
| 30 | public static $method_max = 'min'; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * ColumnSummary constructor. |
||
| 34 | * @param string $column |
||
| 35 | */ |
||
| 36 | public function __construct($column) |
||
| 40 | |||
| 41 | |||
| 42 | /** |
||
| 43 | * @return string |
||
| 44 | */ |
||
| 45 | public function getMethod() |
||
| 49 | |||
| 50 | |||
| 51 | /** |
||
| 52 | * @param string $method use ColumnSummary::$method_... |
||
| 53 | * @return ColumnSummary |
||
| 54 | */ |
||
| 55 | public function setMethod($method) |
||
| 60 | } |