You are here

public function Pecl::generate in Service Container 7.2

Same name and namespace in other branches
  1. 7 lib/Drupal/Component/Uuid/Pecl.php \Drupal\Component\Uuid\Pecl::generate()

Generates a Universally Unique IDentifier (UUID).

Return value

A 16 byte integer represented as a hex string formatted with 4 hyphens.

Overrides UuidInterface::generate

File

lib/Drupal/Component/Uuid/Pecl.php, line 18
Contains \Drupal\Component\Uuid\Pecl.

Class

Pecl
UUID implementation using the PECL extension.

Namespace

Drupal\Component\Uuid

Code

public function generate() {
  return uuid_create(UUID_TYPE_DEFAULT);
}