1 | <?php |
||
27 | trait SequenceTrait |
||
28 | { |
||
29 | use UtilityTrait; |
||
30 | |||
31 | /** |
||
32 | * epoch for this uuid lib |
||
33 | * |
||
34 | * @var string |
||
35 | * @access protected |
||
36 | * @staticvar |
||
37 | */ |
||
38 | protected static $epoch = '2016/01/01'; |
||
39 | |||
40 | /** |
||
41 | * Time related part |
||
42 | * |
||
43 | * @return string 15-char string |
||
44 | * @access protected |
||
45 | */ |
||
46 | protected function getTimestamp()/*# : string */ |
||
54 | |||
55 | /** |
||
56 | * Reverse of getTimestamp(), convert 15-char string to unix time |
||
57 | * |
||
58 | * @param string $hexValue |
||
59 | * @return int |
||
60 | * @access protected |
||
61 | * @static |
||
62 | */ |
||
63 | protected static function toTimeStamp(/*# string */ $hexValue)/*# : int */ |
||
68 | |||
69 | /** |
||
70 | * Get a pseudo sequence number |
||
71 | * |
||
72 | * @return int |
||
73 | * @access protected |
||
74 | * @static |
||
75 | */ |
||
76 | protected function getSequence()/*# : int */ |
||
81 | } |
||
82 |