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

Breadcrumb

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

function RandomGeneratorInterface::generate

Generates a string of randomized binary data

Parameters

int<1, max> $length The number of bytes of random binary data to generate:

Return value

string A binary string

4 methods override RandomGeneratorInterface::generate()
CombGenerator::generate in vendor/ramsey/uuid/src/Generator/CombGenerator.php
@inheritDoc
PeclUuidRandomGenerator::generate in vendor/ramsey/uuid/src/Generator/PeclUuidRandomGenerator.php
Generates a string of randomized binary data
RandomBytesGenerator::generate in vendor/ramsey/uuid/src/Generator/RandomBytesGenerator.php
@inheritDoc
RandomLibAdapter::generate in vendor/ramsey/uuid/src/Generator/RandomLibAdapter.php
Generates a string of randomized binary data

File

vendor/ramsey/uuid/src/Generator/RandomGeneratorInterface.php, line 29

Class

RandomGeneratorInterface
A random generator generates strings of random binary data

Namespace

Ramsey\Uuid\Generator

Code

public function generate(int $length) : string;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal