1 | <?php |
||
16 | class DateTime extends AbstractFormatterProvider |
||
17 | { |
||
18 | /** |
||
19 | * Format the datetime as a date |
||
20 | * |
||
21 | * @param mixed $value |
||
22 | * @param string $format |
||
23 | * @return string |
||
24 | */ |
||
25 | 1 | public function asDate($value, $format = 'Y-m-d') |
|
29 | |||
30 | /** |
||
31 | * Format the datetime as a date |
||
32 | * |
||
33 | * @param mixed $value |
||
34 | * @param string $format |
||
35 | * @return string |
||
36 | */ |
||
37 | 1 | public function asTime($value, $format = 'H:i:s') |
|
41 | |||
42 | /** |
||
43 | * Format the datetime as a date |
||
44 | * |
||
45 | * @param mixed $value |
||
46 | * @param string $format |
||
47 | * @return string |
||
48 | */ |
||
49 | 1 | public function asDateTime($value, $format = 'Y-m-d H:i:s') |
|
53 | |||
54 | /** |
||
55 | * Take in a number of seconds and display that as a human readable amount of time |
||
56 | * |
||
57 | * @param int $value |
||
58 | * @return string |
||
59 | * @todo implement |
||
60 | */ |
||
61 | public function asHuman($value) |
||
67 | |||
68 | /** |
||
69 | * Generate the output from the value |
||
70 | * |
||
71 | * @param mixed $value the datetime value |
||
72 | * @param string $format format string |
||
73 | * @return string |
||
74 | */ |
||
75 | 3 | private function output($value, $format) |
|
81 | |||
82 | /** |
||
83 | * Convert the datetime input into a instance of Carbon |
||
84 | * |
||
85 | * @param mixed $value the datetime value |
||
86 | * @return Carbon |
||
87 | */ |
||
88 | 3 | private function normaliseValue($value) |
|
97 | |||
98 | /** |
||
99 | * Get an instance of the carbon datetime handler |
||
100 | * |
||
101 | * @return Carbon |
||
102 | * @throws FormatterException if carbon isn't available |
||
103 | */ |
||
104 | 3 | private function getCarbon() |
|
113 | } |
||
114 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.