Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
EthDataTypeInterface Interface Reference
+ Inheritance diagram for EthDataTypeInterface:

Public Member Functions

 getProperty (string $property='value', bool $hex_val=false)
 
 setValue ($val, array $params=[])
 
 toArray ()
 

Static Public Member Functions

static isPrimitive ()
 
static getDataLengthType ()
 
static getTypeClass (string $type, bool $typed_constructor=false)
 

Detailed Description

Definition at line 12 of file EthDataTypeInterface.php.

Member Function Documentation

◆ getDataLengthType()

static getDataLengthType ( )
static

Get length of this data type.

Returns
string [dynamic|fixed]

Implemented in EthQ, EthDataType, EthBytes, EthD20, and EthD32.

◆ getProperty()

getProperty ( string  $property = 'value',
bool  $hex_val = false 
)

Get property value.

Parameters
string$propertyName of the property. Defaults to 'value'.
bool$hex_valSet to TRUE to get the hexadecimal representation of the property.
Exceptions
ExceptionIf something is wrong.
Returns
string|int|array The property value.*

Implemented in EthDataType.

◆ getTypeClass()

static getTypeClass ( string  $type,
bool  $typed_constructor = false 
)
static

Determine type class name for primitive and complex data types.

Parameters
string$typeType containing Schema name.
bool$typed_constructorIf true this function will return "array" for types of array($type), instead of $type.
Returns
string Class name of type.
Exceptions
ExceptionCould not determine type class

Implemented in EthDataType.

◆ isPrimitive()

static isPrimitive ( )
static

Check if Type is a primitive type.

Returns
bool True if data type is primitive.

Implemented in EthD, and EthDataType.

◆ setValue()

setValue (   $val,
array  $params = [] 
)

Set a value with validation.

Validation is implemented in subclasses.

Parameters
mixed$valValue to set.
array$paramsArray with optional keyed arguments.
Exceptions
ExceptionIf validation is not implemented for type.

Implemented in EthDataType.

◆ toArray()

toArray ( )

Array of the value types.

Returns
array Associative array with properties mapped to value types.

Implemented in EthD, Block, Transaction, FilterChange, Receipt, SHHFilterChange, SHHMessage, CallTransaction, EstimateTransaction, SendTransaction, SHHPost, Filter, EthSyncing, EthFilter, and SHHFilter.


The documentation for this interface was generated from the following file: