Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PeclUuidRandomGenerator.php

class PeclUuidRandomGenerator

PeclUuidRandomGenerator generates strings of random binary data using ext-uuid

@link https://pecl.php.net/package/uuid ext-uuid

Hierarchy

  • class \Ramsey\Uuid\Generator\PeclUuidRandomGenerator implements \Ramsey\Uuid\Generator\RandomGeneratorInterface

Expanded class hierarchy of PeclUuidRandomGenerator

1 file declares its use of PeclUuidRandomGenerator
FeatureSet.php in vendor/ramsey/uuid/src/FeatureSet.php

File

vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php, line 27

Namespace

Ramsey\Uuid\Generator
View source
class PeclUuidRandomGenerator implements RandomGeneratorInterface {
    public function generate(int $length) : string {
        $uuid = uuid_create(UUID_TYPE_RANDOM);
        return uuid_parse($uuid);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
PeclUuidRandomGenerator::generate public function Generates a string of randomized binary data Overrides RandomGeneratorInterface::generate
RSS feed
Powered by Drupal