PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.20
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.20
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 1.10.1 1.10.0 1.9.17 1.9.15 1.9.16 All 164 releases
woocommerce-pos / vendor / ramsey / uuid / src / UuidInterface.php

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

100 lines 2.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;
16
17 use JsonSerializable;
18 use Ramsey\Uuid\Fields\FieldsInterface;
19 use Ramsey\Uuid\Type\Hexadecimal;
20 use Ramsey\Uuid\Type\Integer as IntegerObject;
21 use Serializable;
22
23 /**
24 * A UUID is a universally unique identifier adhering to an agreed-upon
25 * representation format and standard for generation
26 *
27 * @psalm-immutable
28 */
29 interface UuidInterface extends
30 DeprecatedUuidInterface,
31 JsonSerializable,
32 Serializable
33 {
34 /**
35 * Returns -1, 0, or 1 if the UUID is less than, equal to, or greater than
36 * the other UUID
37 *
38 * The first of two UUIDs is greater than the second if the most
39 * significant field in which the UUIDs differ is greater for the first
40 * UUID.
41 *
42 * * Q. What's the value of being able to sort UUIDs?
43 * * A. Use them as keys in a B-Tree or similar mapping.
44 *
45 * @param UuidInterface $other The UUID to compare
46 *
47 * @return int -1, 0, or 1 if the UUID is less than, equal to, or greater than $other
48 */
49 public function compareTo(UuidInterface $other): int;
50
51 /**
52 * Returns true if the UUID is equal to the provided object
53 *
54 * The result is true if and only if the argument is not null, is a UUID
55 * object, has the same variant, and contains the same value, bit for bit,
56 * as the UUID.
57 *
58 * @param object|null $other An object to test for equality with this UUID
59 *
60 * @return bool True if the other object is equal to this UUID
61 */
62 public function equals(?object $other): bool;
63
64 /**
65 * Returns the binary string representation of the UUID
66 *
67 * @psalm-return non-empty-string
68 */
69 public function getBytes(): string;
70
71 /**
72 * Returns the fields that comprise this UUID
73 */
74 public function getFields(): FieldsInterface;
75
76 /**
77 * Returns the hexadecimal representation of the UUID
78 */
79 public function getHex(): Hexadecimal;
80
81 /**
82 * Returns the integer representation of the UUID
83 */
84 public function getInteger(): IntegerObject;
85
86 /**
87 * Returns the string standard representation of the UUID
88 *
89 * @psalm-return non-empty-string
90 */
91 public function toString(): string;
92
93 /**
94 * Casts the UUID to the string standard representation
95 *
96 * @psalm-return non-empty-string
97 */
98 public function __toString(): string;
99 }
100