Open Data Catalog v2.0.0
Drupal\dkan_data\Service\Uuid5 Class Reference

Public Member Functions

 generate ($schema_id, $value)
 
 isValid (string $uuid)
 

Detailed Description

Service to generate predictable uuid's.

We cannot solely rely on the data value. A keyword and a theme described by the same string must not end up being the same uuid, nor reference. Therefore, we create the named identifier from concatenating the schema id and the data value.

Definition at line 17 of file Uuid5.php.

Member Function Documentation

◆ generate()

Drupal\dkan_data\Service\Uuid5::generate (   $schema_id,
  $value 
)

Generate a uuid version 5.

Parameters
string$schema_idThe schema id of this value.
mixed$valueThe value for which we generate a uuid for.
Returns
string The uuid.

Definition at line 30 of file Uuid5.php.

◆ isValid()

Drupal\dkan_data\Service\Uuid5::isValid ( string  $uuid)

Check if a string is a valid UUID.

Parameters
string$uuidThe uuid being tested.
Returns
bool TRUE if valid, FALSE otherwise.

Definition at line 47 of file Uuid5.php.