PluginProbe
Media Cloud Sync / 1.0.1
Media Cloud Sync v1.0.1
1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 All 35 releases
media-cloud-sync / includes / sdk / google / ramsey / uuid / src / Guid / Guid.php

Guid.php in Media Cloud Sync 1.0.1, at includes/sdk/google/ramsey/uuid/src/Guid/Guid.php

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