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

Breadcrumb

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

function Uuid::uuid2

Returns a version 2 (DCE Security) UUID from a local domain, local identifier, host ID, clock sequence, and the current time

Parameters

int $localDomain The local domain to use when generating bytes,: according to DCE Security

IntegerObject|null $localIdentifier The local identifier for the: given domain; this may be a UID or GID on POSIX systems, if the local domain is person or group, or it may be a site-defined identifier if the local domain is org

Hexadecimal|null $node A 48-bit number representing the hardware: address

int|null $clockSeq A 14-bit number used to help avoid duplicates: that could arise when the clock is set backwards in time or if the node ID changes (in a version 2 UUID, the lower 8 bits of this number are replaced with the domain).

Return value

UuidInterface A UuidInterface instance that represents a version 2 UUID

File

vendor/ramsey/uuid/src/Uuid.php, line 619

Class

Uuid
Uuid provides constants and static methods for working with and generating UUIDs

Namespace

Ramsey\Uuid

Code

public static function uuid2(int $localDomain, ?IntegerObject $localIdentifier = null, ?Hexadecimal $node = null, ?int $clockSeq = null) : UuidInterface {
    return self::getFactory()->uuid2($localDomain, $localIdentifier, $node, $clockSeq);
}

API Navigation

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