Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. UuidV1.php

function UuidV1::__construct

Creates a version 1 (Gregorian time) UUID

Parameters

Rfc4122FieldsInterface $fields The fields from which to construct a UUID:

NumberConverterInterface $numberConverter The number converter to use: for converting hex values to/from integers

CodecInterface $codec The codec to use when encoding or decoding: UUID strings

TimeConverterInterface $timeConverter The time converter to use: for converting timestamps extracted from a UUID to unix timestamps

Overrides Uuid::__construct

File

vendor/ramsey/uuid/src/Rfc4122/UuidV1.php, line 45

Class

UuidV1
Gregorian time, or version 1, UUIDs include timestamp, clock sequence, and node values that are combined into a 128-bit unsigned integer

Namespace

Ramsey\Uuid\Rfc4122

Code

public function __construct(Rfc4122FieldsInterface $fields, NumberConverterInterface $numberConverter, CodecInterface $codec, TimeConverterInterface $timeConverter) {
    if ($fields->getVersion() !== Uuid::UUID_TYPE_TIME) {
        throw new InvalidArgumentException('Fields used to create a UuidV1 must represent a ' . 'version 1 (time-based) UUID');
    }
    parent::__construct($fields, $numberConverter, $codec, $timeConverter);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal