PluginProbe
WCPOS – Point of Sale (POS) plugin for WooCommerce / 1.10.7
WCPOS – Point of Sale (POS) plugin for WooCommerce v1.10.7
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 1.10.1 1.10.0 1.9.17 All 166 releases
woocommerce-pos / vendor / ramsey / uuid / src / Guid / Guid.php

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

62 lines 2.2 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\Guid;
16
17 use Ramsey\Uuid\Codec\CodecInterface;
18 use Ramsey\Uuid\Converter\NumberConverterInterface;
19 use Ramsey\Uuid\Converter\TimeConverterInterface;
20 use Ramsey\Uuid\Uuid;
21
22 /**
23 * Guid represents a UUID with "native" (little-endian) byte order
24 *
25 * From Wikipedia:
26 *
27 * > The first three fields are unsigned 32- and 16-bit integers and are subject
28 * > to swapping, while the last two fields consist of uninterpreted bytes, not
29 * > subject to swapping. This byte swapping applies even for versions 3, 4, and
30 * > 5, where the canonical fields do not correspond to the content of the UUID.
31 *
32 * The first three fields of a GUID are encoded in little-endian byte order,
33 * while the last three fields are in network (big-endian) byte order. This is
34 * according to the history of the Microsoft definition of a GUID.
35 *
36 * According to the .NET Guid.ToByteArray method documentation:
37 *
38 * > Note that the order of bytes in the returned byte array is different from
39 * > the string representation of a Guid value. The order of the beginning
40 * > four-byte group and the next two two-byte groups is reversed, whereas the
41 * > order of the last two-byte group and the closing six-byte group is the
42 * > same.
43 *
44 * @link https://en.wikipedia.org/wiki/Universally_unique_identifier#Variants UUID Variants on Wikipedia
45 * @link https://docs.microsoft.com/en-us/windows/win32/api/guiddef/ns-guiddef-guid Windows GUID structure
46 * @link https://docs.microsoft.com/en-us/dotnet/api/system.guid .NET Guid Struct
47 * @link https://docs.microsoft.com/en-us/dotnet/api/system.guid.tobytearray .NET Guid.ToByteArray Method
48 *
49 * @psalm-immutable
50 */
51 final class Guid extends Uuid
52 {
53 public function __construct(
54 Fields $fields,
55 NumberConverterInterface $numberConverter,
56 CodecInterface $codec,
57 TimeConverterInterface $timeConverter
58 ) {
59 parent::__construct($fields, $numberConverter, $codec, $timeConverter);
60 }
61 }
62