Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
IdentityService Class Reference
Inheritance diagram for IdentityService:
IdentityGeneratorInterface

Public Member Functions

 __construct ()
 
 generateId ()
 
 generateIdForData ($data)
 

Detailed Description

Class IdentityService

Definition at line 13 of file IdentityService.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

IdentityService constructor.

Definition at line 23 of file IdentityService.php.

24  {
25  $this->uuidFactory = new \Ramsey\Uuid\UuidFactory();
26  }

Member Function Documentation

◆ generateId()

generateId ( )

@inheritDoc

Implements IdentityGeneratorInterface.

Definition at line 31 of file IdentityService.php.

32  {
33  $uuid = $this->uuidFactory->uuid4();
34  return $uuid->toString();
35  }

◆ generateIdForData()

generateIdForData (   $data)

@inheritDoc

Implements IdentityGeneratorInterface.

Definition at line 40 of file IdentityService.php.

41  {
42  $uuid = $this->uuidFactory->uuid3(Uuid::NAMESPACE_DNS, $data);
43  return $uuid->toString();
44  }

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