PHP Class Doctrine\OXM\Id\UuidGenerator

Since: 1.0
Author: Jonathan H. Wage ([email protected])
Inheritance: extends AbstractIdGenerator
Datei anzeigen Open project: doctrine/oxm

Protected Properties

Property Type Description
$salt string A unique environment value to salt each GUID with.

Public Methods

Method Description
generate ( XmlEntityManager $xem, $xmlEntity ) : string Generates a new GUID
generateV4 ( ) : string Generates a v4 GUID
generateV5 ( string $namespace, string $salt ) : string Generates a v5 GUID
getSalt ( ) : string Returns the current salt value
isValid ( $guid ) : boolean Checks that a given string is a valid uuid.
setSalt ( string $salt ) Used to set the salt that will be applied to each id

Method Details

generate() public method

Generates a new GUID
public generate ( XmlEntityManager $xem, $xmlEntity ) : string
$xem Doctrine\OXM\XmlEntityManager
return string

generateV4() public method

Generates a v4 GUID
public generateV4 ( ) : string
return string

generateV5() public method

Generates a v5 GUID
public generateV5 ( string $namespace, string $salt ) : string
$namespace string The GUID to seed with
$salt string The string to salt this new UUID with
return string

getSalt() public method

Returns the current salt value
public getSalt ( ) : string
return string $salt The current salt

isValid() public method

Checks that a given string is a valid uuid.
public isValid ( $guid ) : boolean
return boolean

setSalt() public method

Used to set the salt that will be applied to each id
public setSalt ( string $salt )
$salt string The sale to use

Property Details

$salt protected_oe property

A unique environment value to salt each GUID with.
protected string $salt
return string