Documentation

EtherFormats
in package

EtherFormats enum represents different formats of Ether for conversions.

Tags
author

DubbaThony

Table of Contents

Cases

ETHER
FINNEY
GETHER
GWEI
KETHER
KWEI
METHER
MWEI
SZABO
TETHER
WEI

Methods

factor()  : int
Gets the integer factor of the EtherFormats enum.
fromAny()  : self
Creates an EtherFormats enum from string or integer factor input type, with a default value.
fromFactor()  : EtherFormats|null
Creates an EtherFormats enum from an integer factor.
fromString()  : EtherFormats|null
Creates an EtherFormats enum from a string of common names of these formats, including common aliases like shannon for gwei.

Cases

Methods

factor()

Gets the integer factor of the EtherFormats enum.

public factor() : int
Return values
int

The factor.

fromAny()

Creates an EtherFormats enum from string or integer factor input type, with a default value.

public static fromAny(int|string|self $in[, self $default = self::ETHER ]) : self
Parameters
$in : int|string|self

The input.

$default : self = self::ETHER

The default EtherFormats enum.

Return values
self

The corresponding EtherFormats enum.

fromFactor()

Creates an EtherFormats enum from an integer factor.

public static fromFactor(int $in) : EtherFormats|null
Parameters
$in : int

The input factor.

Return values
EtherFormats|null

The corresponding EtherFormats enum or null.

fromString()

Creates an EtherFormats enum from a string of common names of these formats, including common aliases like shannon for gwei.

public static fromString(string $in) : EtherFormats|null
Parameters
$in : string

The input string.

Return values
EtherFormats|null

The corresponding EtherFormats enum or null.


        
On this page

Search results