1 | <?php |
||
8 | class TimeBuilder |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * Create a new Time from an array. |
||
13 | * |
||
14 | * @param array $data The data. |
||
15 | * @return Time |
||
16 | */ |
||
17 | public static function fromArray(array $data) |
||
29 | |||
30 | /** |
||
31 | * Create a new time from a string. |
||
32 | * |
||
33 | * @param string $time The time as a string. |
||
34 | * @return Time |
||
35 | * @throws \InvalidArgumentException If the passed time is invalid. |
||
36 | */ |
||
37 | public static function fromString($time) |
||
56 | |||
57 | /** |
||
58 | * Create a new time from a date. |
||
59 | * |
||
60 | * @param \DateTime $date The date. |
||
61 | * @return Time |
||
62 | */ |
||
63 | public static function fromDate(\DateTime $date) |
||
67 | |||
68 | /** |
||
69 | * Create a new time from seconds. |
||
70 | * |
||
71 | * @param integer $seconds The seconds. |
||
72 | * @return Time |
||
73 | */ |
||
74 | public static function fromSeconds($seconds) |
||
90 | } |
||
91 |