1 | <?php |
||
6 | final class DateTime |
||
7 | { |
||
8 | const FORMAT_YMDHIS = 'Y-m-d H:i:s'; |
||
9 | |||
10 | |||
11 | /** @var int */ |
||
12 | private static $_now = null; |
||
13 | |||
14 | /** |
||
15 | * @return int |
||
16 | */ |
||
17 | static function now() { |
||
24 | |||
25 | /** |
||
26 | * @param int|null $value |
||
27 | */ |
||
28 | static function _setNow($value) { |
||
31 | |||
32 | |||
33 | /** |
||
34 | * @param string $format |
||
35 | * @param int|null $ts |
||
36 | * @return string |
||
37 | */ |
||
38 | static function format($format = self::FORMAT_YMDHIS, $ts = null) { |
||
47 | |||
48 | |||
49 | |||
50 | private function __construct() { } |
||
51 | } |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.