php-uuid
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
hellsh\UUID Class Reference

Public Member Functions

 __construct ($uuid)
 
 toString ($withDashes=false)
 
 __toString ()
 

Static Public Member Functions

static v4 ()
 
static v5 ($str, UUID $namespace=null)
 

Public Attributes

 $binary
 

Constructor & Destructor Documentation

◆ __construct()

hellsh\UUID::__construct (   $uuid)
Parameters
string$uuidA UUID string or 16-byte binary string.
Exceptions
InvalidArgumentExceptionWhen the given string is not a valid UUID.

Member Function Documentation

◆ __toString()

hellsh\UUID::__toString ( )

◆ toString()

hellsh\UUID::toString (   $withDashes = false)

Returns the string representation of the UUID.

Parameters
boolean$withDashes
Returns
string

◆ v4()

static hellsh\UUID::v4 ( )
static

Generates a UUIDv4.

Returns
UUID

◆ v5()

static hellsh\UUID::v5 (   $str,
UUID  $namespace = null 
)
static

Generates a UUIDv5.

Parameters
string$str
UUID | null$namespaceDefaults to NULL UUID.
Returns
UUID

Member Data Documentation

◆ $binary

string hellsh\UUID::$binary

The 16-byte binary string containing the UUID.


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