interface NumberConverterInterface (View source)

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

Methods

mixed
fromHex(string $hex)

Converts a hexadecimal number into an integer representation of the number

string
toHex(mixed $integer)

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

Details

mixed fromHex(string $hex)

Converts a hexadecimal number into an integer representation of the number

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

Parameters

string $hex The hexadecimal string representation to convert

Return Value

mixed

string toHex(mixed $integer)

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

Parameters

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

Return Value

string Hexadecimal string