OXID eShop CE  4.10.2
 All Classes Namespaces Files Functions Variables Pages
oxUniversallyUniqueIdGenerator Class Reference

Public Member Functions

 __construct (oxOpenSSLFunctionalityChecker $openSSLChecker=null)
 generate ()
 generateV4 ()
 generateV5 ($sSeed, $sSalt)

Protected Member Functions

 _getOpenSSLChecker ()
 _generateBasedOnOpenSSL ()
 _generateBasedOnMtRand ()

Private Attributes

 $_openSSLChecker

Detailed Description

Class oxUniversallyUniqueIdGenerator used as universally unique id generator.

Definition at line 6 of file oxuniversallyuniqueidgenerator.php.

Constructor & Destructor Documentation

oxUniversallyUniqueIdGenerator::__construct ( oxOpenSSLFunctionalityChecker  $openSSLChecker = null)

Sets dependencies.

Parameters
oxOpenSSLFunctionalityChecker$openSSLChecker

Definition at line 19 of file oxuniversallyuniqueidgenerator.php.

Member Function Documentation

oxUniversallyUniqueIdGenerator::_generateBasedOnMtRand ( )
protected

Generates UUID based on mt_rand.

Returns
string

Definition at line 111 of file oxuniversallyuniqueidgenerator.php.

oxUniversallyUniqueIdGenerator::_generateBasedOnOpenSSL ( )
protected

Generates UUID based on OpenSSL's openssl_random_pseudo_bytes.

Returns
string

Definition at line 97 of file oxuniversallyuniqueidgenerator.php.

oxUniversallyUniqueIdGenerator::_getOpenSSLChecker ( )
protected

gets open SSL checker.

Returns
oxOpenSSLFunctionalityChecker

Definition at line 87 of file oxuniversallyuniqueidgenerator.php.

oxUniversallyUniqueIdGenerator::generate ( )

Generates UUID based on either openSSL's openssl_random_pseudo_bytes or mt_rand.

Returns
string

Definition at line 32 of file oxuniversallyuniqueidgenerator.php.

oxUniversallyUniqueIdGenerator::generateV4 ( )

Generates version 4 UUID.

Returns
string

Definition at line 44 of file oxuniversallyuniqueidgenerator.php.

oxUniversallyUniqueIdGenerator::generateV5 (   $sSeed,
  $sSalt 
)

Generates version 5 UUID.

Parameters
string$sSeed
string$sSalt
Returns
string

Definition at line 63 of file oxuniversallyuniqueidgenerator.php.

Member Data Documentation

oxUniversallyUniqueIdGenerator::$_openSSLChecker
private

Definition at line 12 of file oxuniversallyuniqueidgenerator.php.


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