Documentation

Uuid
in package

FinalYes

A static helper class that implements the logic for generating UUID 4 based on RFC 4122.

Table of Contents

Constants

NIL  = '00000000-0000-0000-0000-000000000000'
The nil UUID is a special form of UUID that is specified to have all 128 bits set to zero

Methods

nil()  : string
v4()  : non-empty-string
Returns an RFC 4122 variant Uuid, created from the provided bytes and version.
bytes()  : string
variant()  : int
Applies the RFC 4122 variant field to the 16-bit clock sequence.
version()  : int
Applies the RFC 4122 version number to the 16-bit `time_hi_and_version` field.

Constants

Methods

nil()

public static nil() : string
Return values
string

v4()

Returns an RFC 4122 variant Uuid, created from the provided bytes and version.

public static v4() : non-empty-string
Tags
link
http://tools.ietf.org/html/rfc4122
throws
Exception
Return values
non-empty-string

bytes()

private static bytes() : string
Tags
throws
Exception
Return values
string

version()

Applies the RFC 4122 version number to the 16-bit `time_hi_and_version` field.

private static version(int $timeHi, int $version) : int
Parameters
$timeHi : int
$version : int
Tags
see
http://tools.ietf.org/html/rfc4122#section-4.1.3
psalm-pure
Return values
int

        
On this page

Search results