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
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
$hashCode
private
int
$hashCode
$hashCounter
private
static int
$hashCounter
= 0
Methods
__call()
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Tags
__callStatic()
public
static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : mixed
- $arguments : array<string|int, mixed>
__construct()
public
__construct() : mixed
__destruct()
public
__destruct() : mixed
__get()
public
__get(string $property) : mixed
Parameters
- $property : string
extends()
public
extends(ReflectionClass $reflector) : bool
Parameters
- $reflector : ReflectionClass
Return values
boolgetReflection()
public
getReflection() : ReflectionClass
Return values
ReflectionClassid()
public
static id() : string
Return values
stringis_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'
init()
protected
init() : mixed