1 | <?php |
||
19 | class SimpleDateMapper extends AbstractPropertyMapper |
||
20 | { |
||
21 | /** @var AsSimpleDate */ |
||
22 | private $options; |
||
23 | |||
24 | /** |
||
25 | * C'tor. |
||
26 | * |
||
27 | * @param AsSimpleDate $options |
||
28 | */ |
||
29 | 26 | public function __construct(AsSimpleDate $options) |
|
33 | |||
34 | /** |
||
35 | * @return AsSimpleDate |
||
36 | */ |
||
37 | 1 | public function getOptions() |
|
41 | |||
42 | /** |
||
43 | * @param Slumberer $slumberer |
||
44 | * @param mixed $value |
||
45 | * |
||
46 | * @return UTCDateTime |
||
47 | */ |
||
48 | 43 | public function slumber(Slumberer $slumberer, $value) |
|
62 | |||
63 | /** |
||
64 | * @param Awaker $awaker |
||
65 | * @param mixed $value |
||
66 | * |
||
67 | * @return \DateTime|null |
||
68 | */ |
||
69 | 30 | public function awake(Awaker $awaker, $value) |
|
87 | |||
88 | /** |
||
89 | * @param $value |
||
90 | * |
||
91 | * @return bool |
||
92 | */ |
||
93 | 8 | private function isAwakeLocalDateCompatible($value) |
|
99 | |||
100 | /** |
||
101 | * TODO: move this to Psi and make a IsTimezoneString |
||
102 | * TODO: add more that are not in timezone_identifiers_list(): https://en.wikipedia.org/wiki/List_of_tz_database_time_zones |
||
103 | * |
||
104 | * @param $str |
||
105 | * |
||
106 | * @return bool |
||
107 | */ |
||
108 | 3 | private function isTimezone($str) |
|
125 | } |
||
126 |