| 1 | <?php |
||
| 9 | class DateTimeDescriptor implements DescriptorInterface |
||
| 10 | { |
||
| 11 | private $dateTime; |
||
| 12 | |||
| 13 | public function __construct(\DateTime $dateTime) |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Return the \DateTime object. |
||
| 20 | */ |
||
| 21 | public function getDateTime(): \DateTime |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Shortcut for \DateTime#format($format). |
||
| 28 | * |
||
| 29 | * @param string $format |
||
| 30 | */ |
||
| 31 | public function format(string $format): string |
||
| 35 | } |
||
| 36 |