TTUUID
in package
Table of Contents
- $uuid_counter : mixed
- castUUID() : int|string
- convertIntToUUID() : int|string
- convertStringToUUID() : string
- convertUUIDtoInt() : int
- generateRandomSeed() : string
- generateSeed() : bool|string
- generateUUID() : string
- Create an ORDERED UUID https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/ This is about 20-30% faster than generateUUIDOld() and should contain more random data, reducing chance of collisions when running in parallel (ie: unit tests)
- getConversionPrefix() : bool|string
- getNotExistID() : int|string
- getRegex() : string
- getSeed() : bool|string
- getUUIDGroup() : bool
- getZeroID() : int|string
- isUUID() : bool
- truncateUUID() : string
Properties
$uuid_counter
protected
static mixed
$uuid_counter
= 1
Methods
castUUID()
public
static castUUID(string $uuid[, bool $allow_null = false ]) : int|string
Parameters
- $uuid : string
-
UUID
- $allow_null : bool = false
Return values
int|string —convertIntToUUID()
public
static convertIntToUUID( $int) : int|string
Parameters
Return values
int|string —convertStringToUUID()
public
static convertStringToUUID( $str) : string
Parameters
Return values
string —convertUUIDtoInt()
public
static convertUUIDtoInt(string $uuid) : int
Parameters
- $uuid : string
-
UUID
Return values
int —generateRandomSeed()
public
static generateRandomSeed() : string
Return values
string —generateSeed()
public
static generateSeed() : bool|string
Return values
bool|string —generateUUID()
Create an ORDERED UUID https://www.percona.com/blog/2014/12/19/store-uuid-optimized-way/ This is about 20-30% faster than generateUUIDOld() and should contain more random data, reducing chance of collisions when running in parallel (ie: unit tests)
public
static generateUUID([null $seed = null ]) : string
Parameters
- $seed : null = null
Return values
string —getConversionPrefix()
public
static getConversionPrefix() : bool|string
Return values
bool|string —getNotExistID()
public
static getNotExistID([null $int = null ]) : int|string
Parameters
- $int : null = null
Return values
int|string —getRegex()
public
static getRegex([bool $exact_string = true ]) : string
Parameters
- $exact_string : bool = true
Return values
string —getSeed()
public
static getSeed([bool $fail_to_random = false ]) : bool|string
Parameters
- $fail_to_random : bool = false
Return values
bool|string —getUUIDGroup()
public
static getUUIDGroup( $uuid[, int $group = 4 ]) : bool
Parameters
Return values
bool —getZeroID()
public
static getZeroID() : int|string
Return values
int|string —isUUID()
public
static isUUID(string $uuid) : bool
Parameters
- $uuid : string
-
UUID
Return values
bool —truncateUUID()
public
static truncateUUID( $uuid, $length[, bool $include_dashes = true ]) : string