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

Breadcrumb

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

function FeatureSet::buildTimeGenerator

Returns a time generator configured for this environment

Parameters

TimeProviderInterface $timeProvider The time provider to use with: the time generator

3 calls to FeatureSet::buildTimeGenerator()
FeatureSet::setCalculator in vendor/ramsey/uuid/src/FeatureSet.php
Sets the calculator to use in this environment
FeatureSet::setNodeProvider in vendor/ramsey/uuid/src/FeatureSet.php
Sets the node provider to use in this environment
FeatureSet::setTimeProvider in vendor/ramsey/uuid/src/FeatureSet.php
Sets the time provider to use in this environment

File

vendor/ramsey/uuid/src/FeatureSet.php, line 326

Class

FeatureSet
FeatureSet detects and exposes available features in the current environment

Namespace

Ramsey\Uuid

Code

private function buildTimeGenerator(TimeProviderInterface $timeProvider) : TimeGeneratorInterface {
    if ($this->enablePecl) {
        return new PeclUuidTimeGenerator();
    }
    return (new TimeGeneratorFactory($this->nodeProvider, $this->timeConverter, $timeProvider))
        ->getGenerator();
}

API Navigation

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