| 148 |
lars |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* This file is part of the ramsey/uuid library
|
|
|
5 |
*
|
|
|
6 |
* For the full copyright and license information, please view the LICENSE
|
|
|
7 |
* file that was distributed with this source code.
|
|
|
8 |
*
|
|
|
9 |
* @copyright Copyright (c) Ben Ramsey <ben@benramsey.com>
|
|
|
10 |
* @license http://opensource.org/licenses/MIT MIT
|
|
|
11 |
*/
|
|
|
12 |
|
|
|
13 |
declare(strict_types=1);
|
|
|
14 |
|
|
|
15 |
namespace Ramsey\Uuid;
|
|
|
16 |
|
|
|
17 |
use DateTimeInterface;
|
|
|
18 |
use Ramsey\Uuid\Converter\NumberConverterInterface;
|
|
|
19 |
|
|
|
20 |
/**
|
|
|
21 |
* This interface encapsulates deprecated methods for ramsey/uuid
|
|
|
22 |
*
|
|
|
23 |
* @psalm-immutable
|
|
|
24 |
*/
|
|
|
25 |
interface DeprecatedUuidInterface
|
|
|
26 |
{
|
|
|
27 |
/**
|
|
|
28 |
* @deprecated This method will be removed in 5.0.0. There is no alternative
|
|
|
29 |
* recommendation, so plan accordingly.
|
|
|
30 |
*/
|
|
|
31 |
public function getNumberConverter(): NumberConverterInterface;
|
|
|
32 |
|
|
|
33 |
/**
|
|
|
34 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
35 |
* {@see FieldsInterface} instance.
|
|
|
36 |
*
|
|
|
37 |
* @return string[]
|
|
|
38 |
*/
|
|
|
39 |
public function getFieldsHex(): array;
|
|
|
40 |
|
|
|
41 |
/**
|
|
|
42 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
43 |
* {@see FieldsInterface} instance. If it is a
|
|
|
44 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
|
|
45 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()}.
|
|
|
46 |
*/
|
|
|
47 |
public function getClockSeqHiAndReservedHex(): string;
|
|
|
48 |
|
|
|
49 |
/**
|
|
|
50 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
51 |
* {@see FieldsInterface} instance. If it is a
|
|
|
52 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
|
|
53 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()}.
|
|
|
54 |
*/
|
|
|
55 |
public function getClockSeqLowHex(): string;
|
|
|
56 |
|
|
|
57 |
/**
|
|
|
58 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
59 |
* {@see FieldsInterface} instance. If it is a
|
|
|
60 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
|
|
61 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()}.
|
|
|
62 |
*/
|
|
|
63 |
public function getClockSequenceHex(): string;
|
|
|
64 |
|
|
|
65 |
/**
|
|
|
66 |
* @deprecated In ramsey/uuid version 5.0.0, this will be removed from the
|
|
|
67 |
* interface. It is available at {@see UuidV1::getDateTime()}.
|
|
|
68 |
*/
|
|
|
69 |
public function getDateTime(): DateTimeInterface;
|
|
|
70 |
|
|
|
71 |
/**
|
|
|
72 |
* @deprecated This method will be removed in 5.0.0. There is no direct
|
|
|
73 |
* alternative, but the same information may be obtained by splitting
|
|
|
74 |
* in half the value returned by {@see UuidInterface::getHex()}.
|
|
|
75 |
*/
|
|
|
76 |
public function getLeastSignificantBitsHex(): string;
|
|
|
77 |
|
|
|
78 |
/**
|
|
|
79 |
* @deprecated This method will be removed in 5.0.0. There is no direct
|
|
|
80 |
* alternative, but the same information may be obtained by splitting
|
|
|
81 |
* in half the value returned by {@see UuidInterface::getHex()}.
|
|
|
82 |
*/
|
|
|
83 |
public function getMostSignificantBitsHex(): string;
|
|
|
84 |
|
|
|
85 |
/**
|
|
|
86 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
87 |
* {@see FieldsInterface} instance. If it is a
|
|
|
88 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
|
|
89 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()}.
|
|
|
90 |
*/
|
|
|
91 |
public function getNodeHex(): string;
|
|
|
92 |
|
|
|
93 |
/**
|
|
|
94 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
95 |
* {@see FieldsInterface} instance. If it is a
|
|
|
96 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
|
|
97 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()}.
|
|
|
98 |
*/
|
|
|
99 |
public function getTimeHiAndVersionHex(): string;
|
|
|
100 |
|
|
|
101 |
/**
|
|
|
102 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
103 |
* {@see FieldsInterface} instance. If it is a
|
|
|
104 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
|
|
105 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()}.
|
|
|
106 |
*/
|
|
|
107 |
public function getTimeLowHex(): string;
|
|
|
108 |
|
|
|
109 |
/**
|
|
|
110 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
111 |
* {@see FieldsInterface} instance. If it is a
|
|
|
112 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
|
|
113 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()}.
|
|
|
114 |
*/
|
|
|
115 |
public function getTimeMidHex(): string;
|
|
|
116 |
|
|
|
117 |
/**
|
|
|
118 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
119 |
* {@see FieldsInterface} instance. If it is a
|
|
|
120 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
|
|
121 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()}.
|
|
|
122 |
*/
|
|
|
123 |
public function getTimestampHex(): string;
|
|
|
124 |
|
|
|
125 |
/**
|
|
|
126 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
127 |
* {@see FieldsInterface} instance. If it is a
|
|
|
128 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
|
|
129 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}.
|
|
|
130 |
*/
|
|
|
131 |
public function getVariant(): ?int;
|
|
|
132 |
|
|
|
133 |
/**
|
|
|
134 |
* @deprecated Use {@see UuidInterface::getFields()} to get a
|
|
|
135 |
* {@see FieldsInterface} instance. If it is a
|
|
|
136 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
|
|
|
137 |
* {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}.
|
|
|
138 |
*/
|
|
|
139 |
public function getVersion(): ?int;
|
|
|
140 |
}
|