PHP Class Habari\UUID

Show file Open project: habari/system

Public Methods

Method Description
__construct ( integer $version = 4 ) Create a UUID (Universally Unique IDentifier) as per RfC 4122.
__toString ( ) : a
get ( ) : the Create a UUID and return its canonical hexadecimal representation.
get_array ( ) : the
get_hex ( ) : the
get_raw ( ) : the

Method Details

__construct() public method

Currently, only version 4 UUIDs are supported (Section 4.4, "Algorithms for Creating a UUID from Truly Random or Pseudo-Random Numbers").
public __construct ( integer $version = 4 )
$version integer UUID version to generate (currently, only version 4 is supported)

__toString() public method

public __toString ( ) : a
return a string representation of this object.

get() public static method

Create a UUID and return its canonical hexadecimal representation.
public static get ( ) : the
return the canonical hexadecimal representation of the generated UUID

get_array() public method

public get_array ( ) : the
return the generated UUID as an array of bytes

get_hex() public method

public get_hex ( ) : the
return the canonical hexadecimal representation of the generated UUID

get_raw() public method

public get_raw ( ) : the
return the generated UUID as a string of bytes