Documentation

TimeGeneratorInterface

TimeGeneratorInterface provides functionality to generate strings of binary data for version 1 UUIDs based on a host ID, sequence number, and the current time

Table of Contents

generate()  : string
Generate a version 1 UUID from a host ID, sequence number, and the current time

Methods

generate()

Generate a version 1 UUID from a host ID, sequence number, and the current time

public generate([int|string $node = null ][, int $clockSeq = null ]) : string
Parameters
$node : int|string = null

A 48-bit number representing the hardware address This number may be represented as an integer or a hexadecimal string.

$clockSeq : int = null

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.

Tags
throws
UnsatisfiedDependencyException

if called on a 32-bit system and Moontoast\Math\BigNumber is not present

throws
InvalidArgumentException
throws
Exception

if it was not possible to gather sufficient entropy

Return values
string

A binary string

Search results