public function Pecl::generate

public 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

core/lib/Drupal/Component/Uuid/Pecl.php, line 13

Class

Pecl
Generates a UUID using the PECL extension.

Namespace

Drupal\Component\Uuid

Code

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Component!Uuid!Pecl.php/function/Pecl::generate/8.1.x