1 | <?php |
||
10 | abstract class AbstractFieldParserDate extends FieldParserFixedText implements FieldParserInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var DateFormatterFactory |
||
14 | */ |
||
15 | private $dateFormatterFactory; |
||
16 | |||
17 | /** |
||
18 | * @param DateFormatterFactory $dateFormatterFactory |
||
19 | */ |
||
20 | public function __construct(DateFormatterFactory $dateFormatterFactory) |
||
24 | |||
25 | /** |
||
26 | * @return string |
||
27 | * @throws UnsupportedDateFormatException |
||
28 | */ |
||
29 | public function getText() |
||
39 | |||
40 | /** |
||
41 | * Fetch a DateTime object set to the correct date/time. |
||
42 | * |
||
43 | * @return \DateTimeInterface |
||
44 | */ |
||
45 | abstract protected function getDateTime(); |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getDateFormat() |
||
54 | |||
55 | /** |
||
56 | * @return FieldParserInterface |
||
57 | */ |
||
58 | public static function factory() |
||
64 | } |
||
65 |