Public Member Functions | Static Public Member Functions

UUID Class Reference

List of all members.

Public Member Functions

 __construct ($version=4)
 __toString ()
 get_array ()
 get_raw ()
 get_hex ()

Static Public Member Functions

static get ()

Detailed Description

Class to create and format UUIDs.

Definition at line 12 of file uuid.php.


Constructor & Destructor Documentation

UUID::__construct ( version = 4  ) 

Create a UUID (Universally Unique IDentifier) as per RfC 4122.

Currently, only version 4 UUIDs are supported (Section 4.4, "Algorithms for Creating a UUID from Truly Random or Pseudo-Random Numbers").

Parameters:
int $version UUID version to generate (currently, only version 4 is supported)

Definition at line 24 of file uuid.php.


Member Function Documentation

UUID::__toString (  ) 
Returns:
a string representation of this object.

Definition at line 45 of file uuid.php.

static UUID::get (  )  [static]

Create a UUID and return its canonical hexadecimal representation.

Returns:
the canonical hexadecimal representation of the generated UUID

Definition at line 87 of file uuid.php.

Referenced by Session::create().

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

Definition at line 53 of file uuid.php.

UUID::get_hex (  ) 
Returns:
the canonical hexadecimal representation of the generated UUID

Definition at line 69 of file uuid.php.

Referenced by __toString().

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

Definition at line 61 of file uuid.php.


The documentation for this class was generated from the following file: