Version 1
[yaffs-website] / web / core / lib / Drupal / Component / Uuid / Pecl.php
diff --git a/web/core/lib/Drupal/Component/Uuid/Pecl.php b/web/core/lib/Drupal/Component/Uuid/Pecl.php
new file mode 100644 (file)
index 0000000..554d6a2
--- /dev/null
@@ -0,0 +1,17 @@
+<?php
+
+namespace Drupal\Component\Uuid;
+
+/**
+ * Generates a UUID using the PECL extension.
+ */
+class Pecl implements UuidInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function generate() {
+    return uuid_create(UUID_TYPE_DEFAULT);
+  }
+
+}