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

Breadcrumb

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

class BigNumberConverter

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

@psalm-immutable

Hierarchy

  • class \Ramsey\Uuid\Converter\Number\BigNumberConverter implements \Ramsey\Uuid\Converter\NumberConverterInterface

Expanded class hierarchy of BigNumberConverter

Deprecated

Transition to {

See also

GenericNumberConverter}.

File

vendor/ramsey/uuid/src/Converter/Number/BigNumberConverter.php, line 28

Namespace

Ramsey\Uuid\Converter\Number
View source
class BigNumberConverter implements NumberConverterInterface {
    private NumberConverterInterface $converter;
    public function __construct() {
        $this->converter = new GenericNumberConverter(new BrickMathCalculator());
    }
    
    /**
     * @inheritDoc
     * @psalm-pure
     */
    public function fromHex(string $hex) : string {
        return $this->converter
            ->fromHex($hex);
    }
    
    /**
     * @inheritDoc
     * @psalm-pure
     */
    public function toHex(string $number) : string {
        return $this->converter
            ->toHex($number);
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
BigNumberConverter::$converter private property
BigNumberConverter::fromHex public function @inheritDoc
@psalm-pure
Overrides NumberConverterInterface::fromHex
BigNumberConverter::toHex public function @inheritDoc
@psalm-pure
Overrides NumberConverterInterface::toHex
BigNumberConverter::__construct public function
RSS feed
Powered by Drupal