Debian Codegraph @

vendor/ramsey/uuid/src/DeprecatedUuidInterface.php

raw
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 <[email protected]>
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 * @immutable
24 */
25 interface DeprecatedUuidInterface
26 {
27 /**
28 * @deprecated This method will be removed in 5.0.0. There is no alternative recommendation, so plan accordingly.
29 */
30 public function getNumberConverter(): NumberConverterInterface;
31
32 /**
33 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance.
34 *
35 * @return string[]
36 */
37 public function getFieldsHex(): array;
38
39 /**
40 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a
41 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
42 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqHiAndReserved()}.
43 */
44 public function getClockSeqHiAndReservedHex(): string;
45
46 /**
47 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a
48 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
49 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeqLow()}.
50 */
51 public function getClockSeqLowHex(): string;
52
53 /**
54 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a
55 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
56 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getClockSeq()}.
57 */
58 public function getClockSequenceHex(): string;
59
60 /**
61 * @deprecated In ramsey/uuid version 5.0.0, this will be removed from the interface. It is available at
62 * {@see UuidV1::getDateTime()}.
63 */
64 public function getDateTime(): DateTimeInterface;
65
66 /**
67 * @deprecated This method will be removed in 5.0.0. There is no direct alternative, but the same information may be
68 * obtained by splitting in half the value returned by {@see UuidInterface::getHex()}.
69 */
70 public function getLeastSignificantBitsHex(): string;
71
72 /**
73 * @deprecated This method will be removed in 5.0.0. There is no direct alternative, but the same information may be
74 * obtained by splitting in half the value returned by {@see UuidInterface::getHex()}.
75 */
76 public function getMostSignificantBitsHex(): string;
77
78 /**
79 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a
80 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
81 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getNode()}.
82 */
83 public function getNodeHex(): string;
84
85 /**
86 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a
87 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
88 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeHiAndVersion()}.
89 */
90 public function getTimeHiAndVersionHex(): string;
91
92 /**
93 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a
94 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
95 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeLow()}.
96 */
97 public function getTimeLowHex(): string;
98
99 /**
100 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a
101 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
102 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimeMid()}.
103 */
104 public function getTimeMidHex(): string;
105
106 /**
107 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a
108 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
109 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getTimestamp()}.
110 */
111 public function getTimestampHex(): string;
112
113 /**
114 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a
115 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
116 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVariant()}.
117 */
118 public function getVariant(): ?int;
119
120 /**
121 * @deprecated Use {@see UuidInterface::getFields()} to get a {@see FieldsInterface} instance. If it is a
122 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface} instance, you may call
123 * {@see \Ramsey\Uuid\Rfc4122\FieldsInterface::getVersion()}.
124 */
125 public function getVersion(): ?int;
126 }