| 1 | <?php |
||
| 8 | abstract class Presenter |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Model |
||
| 12 | */ |
||
| 13 | public $model; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Presenter constructor. |
||
| 17 | * @param Model $model |
||
| 18 | */ |
||
| 19 | public function __construct(Model $model) |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Format date. |
||
| 26 | * |
||
| 27 | * @param $date |
||
| 28 | * @param string $format |
||
| 29 | * @return mixed |
||
| 30 | */ |
||
| 31 | public function date($date, $format = 'd.m.Y') |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Created at. |
||
| 38 | * |
||
| 39 | * @param string $format |
||
| 40 | * @return mixed |
||
| 41 | */ |
||
| 42 | public function created($format = 'd.m.Y') |
||
| 46 | |||
| 47 | /** |
||
| 48 | * Updated at. |
||
| 49 | * |
||
| 50 | * @param string $format |
||
| 51 | * @return mixed |
||
| 52 | */ |
||
| 53 | public function updated($format = 'd.m.Y') |
||
| 57 | |||
| 58 | /** |
||
| 59 | * Get all presenter methods for current presentor instance. |
||
| 60 | * |
||
| 61 | * @return array |
||
| 62 | */ |
||
| 63 | public function presentors() |
||
| 76 | } |