PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 3.1.4
ShareThis Dashboard for Google Analytics v3.1.4
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / lib / analytics-admin / vendor / ramsey / uuid / src / Guid / Guid.php
googleanalytics / lib / analytics-admin / vendor / ramsey / uuid / src / Guid Last commit date
Fields.php 3 years ago Guid.php 3 years ago GuidBuilder.php 3 years ago
Guid.php
62 lines
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 <ben@benramsey.com>
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