1 | <?php |
||
27 | final class DateTime extends Variadic implements DayInterface |
||
28 | { |
||
29 | use DayTrait; |
||
30 | |||
31 | protected $date; |
||
32 | protected $time; |
||
33 | |||
34 | /** |
||
35 | * @param Date $date |
||
36 | * @param Time $time |
||
37 | */ |
||
38 | 10 | public function __construct(Date $date, Time $time) |
|
46 | |||
47 | /** |
||
48 | * @return DateTime |
||
49 | */ |
||
50 | 9 | public static function now() |
|
54 | |||
55 | /** |
||
56 | * @param \DateTime $dateTime |
||
57 | * @return static |
||
58 | */ |
||
59 | 9 | public static function fromNative(\DateTime $dateTime) |
|
74 | |||
75 | /** |
||
76 | * @return int |
||
77 | */ |
||
78 | 1 | public function getValue() |
|
82 | |||
83 | /** |
||
84 | * @param $timestamp |
||
85 | * @return DateTime |
||
86 | */ |
||
87 | 1 | public static function fromTimestamp($timestamp) |
|
91 | |||
92 | /** |
||
93 | * @return Date |
||
94 | */ |
||
95 | 1 | public function getDate() |
|
99 | |||
100 | /** |
||
101 | * @return Time |
||
102 | */ |
||
103 | 1 | public function getTime() |
|
107 | |||
108 | /** |
||
109 | * @return string |
||
110 | */ |
||
111 | 2 | public function __toString() |
|
115 | } |
||
116 |