PluginProbe
Media Cloud Sync / 1.4.2
Media Cloud Sync v1.4.2
1.4.2 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 All 36 releases
media-cloud-sync / includes / sdk / google / ramsey / uuid / src / Guid / Guid.php

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

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