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

Breadcrumb

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

class BigNumberTimeConverter

Previously used to integrate moontoast/math as a bignum arithmetic library, BigNumberTimeConverter is deprecated in favor of GenericTimeConverter

@psalm-immutable

Hierarchy

  • class \Ramsey\Uuid\Converter\Time\BigNumberTimeConverter implements \Ramsey\Uuid\Converter\TimeConverterInterface

Expanded class hierarchy of BigNumberTimeConverter

Deprecated

Transition to {

See also

GenericTimeConverter}.

File

vendor/ramsey/uuid/src/Converter/Time/BigNumberTimeConverter.php, line 30

Namespace

Ramsey\Uuid\Converter\Time
View source
class BigNumberTimeConverter implements TimeConverterInterface {
    private TimeConverterInterface $converter;
    public function __construct() {
        $this->converter = new GenericTimeConverter(new BrickMathCalculator());
    }
    public function calculateTime(string $seconds, string $microseconds) : Hexadecimal {
        return $this->converter
            ->calculateTime($seconds, $microseconds);
    }
    public function convertTime(Hexadecimal $uuidTimestamp) : Time {
        return $this->converter
            ->convertTime($uuidTimestamp);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
BigNumberTimeConverter::$converter private property
BigNumberTimeConverter::calculateTime public function Uses the provided seconds and micro-seconds to calculate the count of
100-nanosecond intervals since UTC 00:00:00.00, 15 October 1582, for
RFC 4122 variant UUIDs
Overrides TimeConverterInterface::calculateTime
BigNumberTimeConverter::convertTime public function Converts a timestamp extracted from a UUID to a Unix timestamp Overrides TimeConverterInterface::convertTime
BigNumberTimeConverter::__construct public function
RSS feed
Powered by Drupal