1 | <?php |
||
17 | class TimeFormatter extends ValueFormatterBase { |
||
18 | |||
19 | /** |
||
20 | * @deprecated since 0.7.1, use TimeValue::CALENDAR_GREGORIAN instead |
||
21 | */ |
||
22 | const CALENDAR_GREGORIAN = TimeValue::CALENDAR_GREGORIAN; |
||
23 | |||
24 | /** |
||
25 | * @deprecated since 0.7.1, use TimeValue::CALENDAR_JULIAN instead |
||
26 | */ |
||
27 | const CALENDAR_JULIAN = TimeValue::CALENDAR_JULIAN; |
||
28 | |||
29 | /** |
||
30 | * Option to localize calendar models. Must contain an array mapping known calendar model URIs |
||
31 | * to localized calendar model names. |
||
32 | */ |
||
33 | const OPT_CALENDARNAMES = 'calendars'; |
||
34 | |||
35 | /** |
||
36 | * Option for a custom timestamp formatter. Must contain an instance of a ValueFormatter |
||
37 | * subclass, capable of formatting TimeValue objects. The output of the custom formatter is |
||
38 | * threaded as plain text and passed through. |
||
39 | */ |
||
40 | const OPT_TIME_ISO_FORMATTER = 'time iso formatter'; |
||
41 | |||
42 | /** |
||
43 | * @see ValueFormatterBase::__construct |
||
44 | * |
||
45 | * @param FormatterOptions|null $options |
||
46 | */ |
||
47 | 8 | public function __construct( FormatterOptions $options = null ) { |
|
53 | |||
54 | /** |
||
55 | * @see ValueFormatter::format |
||
56 | * |
||
57 | * @param TimeValue $value |
||
58 | * |
||
59 | * @throws InvalidArgumentException |
||
60 | * @return string Plain text |
||
61 | */ |
||
62 | 8 | public function format( $value ) { |
|
76 | |||
77 | } |
||
78 |