Documentation

NumberConverterInterface

NumberConverterInterface converts UUIDs from hexadecimal characters into representations of integers and vice versa

Table of Contents

fromHex()  : mixed
Converts a hexadecimal number into an integer representation of the number
toHex()  : string
Converts an integer representation into a hexadecimal string representation of the number

Methods

fromHex()

Converts a hexadecimal number into an integer representation of the number

public fromHex(string $hex) : mixed

The integer representation returned may be an object or a string representation of the integer, depending on the implementation.

Parameters
$hex : string

The hexadecimal string representation to convert

Tags
throws
UnsatisfiedDependencyException

if Moontoast\Math\BigNumber is not present

Return values
mixed

toHex()

Converts an integer representation into a hexadecimal string representation of the number

public toHex(mixed $integer) : string
Parameters
$integer : mixed

An integer representation to convert; this may be a true integer, a string integer, or a object representation that this converter can understand

Tags
throws
UnsatisfiedDependencyException

if Moontoast\Math\BigNumber is not present

Return values
string

Hexadecimal string

Search results