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

Breadcrumb

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

interface NumberConverterInterface

A number converter converts UUIDs from hexadecimal characters into representations of integers and vice versa

@psalm-immutable

Hierarchy

  • interface \Ramsey\Uuid\Converter\NumberConverterInterface

Expanded class hierarchy of NumberConverterInterface

All classes that implement NumberConverterInterface

24 files declare their use of NumberConverterInterface
BigNumberConverter.php in vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php
CombGenerator.php in vendor/ramsey/uuid/src/Generator/CombGenerator.php
DceSecurityGenerator.php in vendor/ramsey/uuid/src/Generator/DceSecurityGenerator.php
DegradedUuidBuilder.php in vendor/ramsey/uuid/src/Builder/DegradedUuidBuilder.php
DeprecatedUuidInterface.php in vendor/ramsey/uuid/src/DeprecatedUuidInterface.php

... See full list

File

vendor/ramsey/uuid/src/Converter/NumberConverterInterface.php, line 23

Namespace

Ramsey\Uuid\Converter
View source
interface NumberConverterInterface {
    
    /**
     * Converts a hexadecimal number into an string integer representation of
     * the number
     *
     * The integer representation returned is a string representation of the
     * integer, to accommodate unsigned integers greater than PHP_INT_MAX.
     *
     * @param string $hex The hexadecimal string representation to convert
     *
     * @return string String representation of an integer
     *
     * @psalm-return numeric-string
     *
     * @psalm-pure
     */
    public function fromHex(string $hex) : string;
    
    /**
     * Converts a string integer representation into a hexadecimal string
     * representation of the number
     *
     * @param string $number A string integer representation to convert; this
     *     must be a numeric string to accommodate unsigned integers greater
     *     than PHP_INT_MAX.
     *
     * @return string Hexadecimal string
     *
     * @psalm-return non-empty-string
     *
     * @psalm-pure
     */
    public function toHex(string $number) : string;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
NumberConverterInterface::fromHex public function Converts a hexadecimal number into an string integer representation of
the number
2
NumberConverterInterface::toHex public function Converts a string integer representation into a hexadecimal string
representation of the number
2

API Navigation

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