PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.21
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.21
1.10.25 1.10.24 1.10.23 1.10.22 1.10.21 1.10.20 1.10.19 1.10.18 1.10.17 1.10.16 1.10.15 1.10.13 1.10.14 1.10.12 1.10.11 1.10.10 1.10.9 1.10.8 untagged-3d9b7ccddc54df87c672 1.10.7 1.10.6 1.10.5 1.10.3 1.10.4 1.10.2 All 169 releases
woocommerce-pos / vendor / ramsey / uuid / src / Rfc4122 / FieldsInterface.php

FieldsInterface.php in WCPOS – Point of Sale (POS) plugin for WooCommerce 1.10.21, at vendor/ramsey/uuid/src/Rfc4122/FieldsInterface.php

127 lines 3.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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\Rfc4122;
16
17 use Ramsey\Uuid\Fields\FieldsInterface as BaseFieldsInterface;
18 use Ramsey\Uuid\Type\Hexadecimal;
19
20 /**
21 * RFC 4122 defines fields for a specific variant of UUID
22 *
23 * The fields of an RFC 4122 variant UUID are:
24 *
25 * * **time_low**: The low field of the timestamp, an unsigned 32-bit integer
26 * * **time_mid**: The middle field of the timestamp, an unsigned 16-bit integer
27 * * **time_hi_and_version**: The high field of the timestamp multiplexed with
28 * the version number, an unsigned 16-bit integer
29 * * **clock_seq_hi_and_reserved**: The high field of the clock sequence
30 * multiplexed with the variant, an unsigned 8-bit integer
31 * * **clock_seq_low**: The low field of the clock sequence, an unsigned
32 * 8-bit integer
33 * * **node**: The spatially unique node identifier, an unsigned 48-bit
34 * integer
35 *
36 * @link http://tools.ietf.org/html/rfc4122#section-4.1 RFC 4122, § 4.1: Format
37 *
38 * @psalm-immutable
39 */
40 interface FieldsInterface extends BaseFieldsInterface
41 {
42 /**
43 * Returns the full 16-bit clock sequence, with the variant bits (two most
44 * significant bits) masked out
45 */
46 public function getClockSeq(): Hexadecimal;
47
48 /**
49 * Returns the high field of the clock sequence multiplexed with the variant
50 */
51 public function getClockSeqHiAndReserved(): Hexadecimal;
52
53 /**
54 * Returns the low field of the clock sequence
55 */
56 public function getClockSeqLow(): Hexadecimal;
57
58 /**
59 * Returns the node field
60 */
61 public function getNode(): Hexadecimal;
62
63 /**
64 * Returns the high field of the timestamp multiplexed with the version
65 */
66 public function getTimeHiAndVersion(): Hexadecimal;
67
68 /**
69 * Returns the low field of the timestamp
70 */
71 public function getTimeLow(): Hexadecimal;
72
73 /**
74 * Returns the middle field of the timestamp
75 */
76 public function getTimeMid(): Hexadecimal;
77
78 /**
79 * Returns the full 60-bit timestamp, without the version
80 */
81 public function getTimestamp(): Hexadecimal;
82
83 /**
84 * Returns the variant
85 *
86 * The variant number describes the layout of the UUID. The variant
87 * number has the following meaning:
88 *
89 * - 0 - Reserved for NCS backward compatibility
90 * - 2 - The RFC 4122 variant
91 * - 6 - Reserved, Microsoft Corporation backward compatibility
92 * - 7 - Reserved for future definition
93 *
94 * For RFC 4122 variant UUIDs, this value should always be the integer `2`.
95 *
96 * @link http://tools.ietf.org/html/rfc4122#section-4.1.1 RFC 4122, § 4.1.1: Variant
97 */
98 public function getVariant(): int;
99
100 /**
101 * Returns the version
102 *
103 * The version number describes how the UUID was generated and has the
104 * following meaning:
105 *
106 * 1. Time-based UUID
107 * 2. DCE security UUID
108 * 3. Name-based UUID hashed with MD5
109 * 4. Randomly generated UUID
110 * 5. Name-based UUID hashed with SHA-1
111 *
112 * This returns `null` if the UUID is not an RFC 4122 variant, since version
113 * is only meaningful for this variant.
114 *
115 * @link http://tools.ietf.org/html/rfc4122#section-4.1.3 RFC 4122, § 4.1.3: Version
116 */
117 public function getVersion(): ?int;
118
119 /**
120 * Returns true if these fields represent a nil UUID
121 *
122 * The nil UUID is special form of UUID that is specified to have all 128
123 * bits set to zero.
124 */
125 public function isNil(): bool;
126 }
127