| 1 | <?php |
||
| 12 | class DateColumn implements ColumnFormatter { |
||
| 13 | |||
| 14 | private $_dateFormat; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * DateColumn constructor. |
||
| 18 | * @param string $dateFormat |
||
| 19 | */ |
||
| 20 | 3 | public function __construct(string $dateFormat = 'Y-m-d H:i:s') |
|
| 24 | |||
| 25 | /** |
||
| 26 | * Set the format of the date column, e.g. "Y-m-d H:i:s". |
||
| 27 | * |
||
| 28 | * @param string $dateFormat |
||
| 29 | * @return DateColumn |
||
| 30 | */ |
||
| 31 | 1 | public function dateFormat(string $dateFormat): DateColumn |
|
| 37 | |||
| 38 | /** |
||
| 39 | * @param string $column |
||
| 40 | * @return string |
||
| 41 | */ |
||
| 42 | 3 | public function format(string $column): string |
|
| 46 | } |