From c0c827d3ad2c8364d35fff5546ab40ea76bbbbd9 Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Tue, 28 Aug 2018 12:00:23 +0200 Subject: update composer libs and add ramsey/uuid --- .../uuid/src/Generator/PeclUuidTimeGenerator.php | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php (limited to 'vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php') diff --git a/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php b/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php new file mode 100644 index 000000000..7ccf16fd9 --- /dev/null +++ b/vendor/ramsey/uuid/src/Generator/PeclUuidTimeGenerator.php @@ -0,0 +1,38 @@ + + * @license http://opensource.org/licenses/MIT MIT + * @link https://benramsey.com/projects/ramsey-uuid/ Documentation + * @link https://packagist.org/packages/ramsey/uuid Packagist + * @link https://github.com/ramsey/uuid GitHub + */ + +namespace Ramsey\Uuid\Generator; + +/** + * PeclUuidTimeGenerator provides functionality to generate strings of binary + * data for version 1 UUIDs using the PECL UUID PHP extension + * + * @link https://pecl.php.net/package/uuid + */ +class PeclUuidTimeGenerator implements TimeGeneratorInterface +{ + /** + * Generate a version 1 UUID using the PECL UUID extension + * + * @param int|string $node Not used in this context + * @param int $clockSeq Not used in this context + * @return string A binary string + */ + public function generate($node = null, $clockSeq = null) + { + $uuid = uuid_create(UUID_TYPE_TIME); + + return uuid_parse($uuid); + } +} -- cgit v1.2.3