\ManaPHP\HelperUuid

Summary

Methods
Properties
Constants
v4()
encode_int32()
decode_int32()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

v4()

v4() : string

Generates a v4 random UUID (Universally Unique IDentifier)

The version 4 UUID is purely random (except the version). It doesn't contain meaningful information such as MAC address, time, etc. See RFC 4122 for details of UUID.

This algorithm sets the version number (4 bits) as well as two reserved bits. All other bits (the remaining 122 bits) are set using a random or pseudo-random data source. Version 4 UUIDs have the form xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where x is any hexadecimal digit and y is one of 8, 9, A, or B (e.g., f47ac10b-58cc-4372-a567-0e02b2c3d479).

Returns

string

encode_int32()

encode_int32(integer  $n) : string

Parameters

integer $n

Returns

string

decode_int32()

decode_int32(  $uuid) : string

Parameters

$uuid

Returns

string