| 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 |