Documentation

UUID extends Component
in package

FinalYes

UUID class The following class generates VALID RFC 4122 COMPLIANT Universally Unique IDentifiers (UUID) version 3, 4 and 5. UUIDs generated validates using OSSP UUID Tool, and output for named-based UUIDs are exactly the same. This is a pure PHP implementation.

Tags
author

Andrew Moore

link
http://www.php.net/manual/en/function.uniqid.php#94959
since

Version 0.1.0

Table of Contents

Properties

$hashCode  : int
$hashCounter  : int

Methods

__call()  : mixed
__callStatic()  : mixed
__construct()  : mixed
__destruct()  : mixed
__get()  : mixed
extends()  : bool
getReflection()  : ReflectionClass
id()  : string
is_valid()  : mixed
v4()  : mixed
Generate v4 UUID Version 4 UUIDs are pseudo-random.
v5()  : mixed
Generate v5 UUID Version 5 UUIDs are named based. They require a namespace (another valid UUID) and a value (the name). Given the same namespace and name, the output is always the same.
init()  : mixed

Properties

Methods

__callStatic()

public static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
$method : mixed
$arguments : array<string|int, mixed>

__get()

public __get(string $property) : mixed
Parameters
$property : string

extends()

public extends(ReflectionClass $reflector) : bool
Parameters
$reflector : ReflectionClass
Return values
bool

getReflection()

public getReflection() : ReflectionClass
Return values
ReflectionClass

id()

public static id() : string
Return values
string

is_valid()

public static is_valid(mixed $uuid) : mixed
Parameters
$uuid : mixed

v4()

Generate v4 UUID Version 4 UUIDs are pseudo-random.

public static v4() : mixed

v5()

Generate v5 UUID Version 5 UUIDs are named based. They require a namespace (another valid UUID) and a value (the name). Given the same namespace and name, the output is always the same.

public static v5(uuid $namespace[, string $name = 'uuid_name' ]) : mixed
Parameters
$namespace : uuid
$name : string = 'uuid_name'

        
On this page

Search results