Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
Primitive Types
+ Collaboration diagram for Primitive Types:

Classes

class  EthBytes
 
class  EthD
 
class  EthD20
 
class  EthD32
 
class  EthQ
 
class  EthS
 

Functions

 validate ($val, array $params)
 
 validate ($val, array $params)
 
 validate ($val, array $params)
 

Detailed Description

All data primitive types in Ethereum-PHP are derived from EthD.

Function Documentation

◆ validate() [1/3]

validate (   $val,
array  $params 
)

Implement validation.

Parameters
string | number$val"0x"prefixed hexadecimal or number value.
array$paramsOnly $param['abi'] is relevant.
Exceptions
InvalidArgumentExceptionCan not decode int value. If things are wrong.
Returns
Math_BigInteger Math_BigInteger value.

Definition at line 28 of file EthB.php.

◆ validate() [2/3]

validate (   $val,
array  $params 
)

Implement validation.

Parameters
string$val0x prefixed ABI encoded value.
array$paramsOnly $param['abi'] is relevant.
Returns
string Unprefixed byte value.
Exceptions

Definition at line 33 of file EthBytes.php.

References EthereumStatic\ensureHexPrefix(), and EthereumStatic\removeHexPrefix().

+ Here is the call graph for this function:

◆ validate() [3/3]

validate (   $val,
array  $params 
)

Implement validation.

Parameters
string$val"0x"prefixed hexadecimal byte value.
array$paramsOnly $param['abi'] is relevant.
Exceptions
InvalidArgumentExceptionCan not decode hex binary
Returns
string.

Definition at line 184 of file EthD.php.

References EthereumStatic\ensureHexPrefix(), and EthD\validateHexString().

+ Here is the call graph for this function: