Basic Ethereum data types.
Can be bool, integer, data, lists, arrays...
- See also
- : https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI#types
Definition at line 15 of file EthD.php.
◆ __construct()
| const const __construct |
( |
|
$val, |
|
|
array |
$params = [] |
|
) |
| |
Constructor.
- Parameters
-
| mixed | $val | Hexadecimal or number value. |
| array | $params | Array with optional parameters. Add Abi type $params['abi'] = 'unint8'. |
- Exceptions
-
Definition at line 143 of file EthD.php.
References EthDataType\setValue().
◆ convertByAbi()
◆ convertTo()
Turn value into Expected value.
- Deprecated:
- This function will be removed ans should not be used. Pleas switch toconvertByAbi($abiType).
- Parameters
-
| string | $type | Expected Abi type. |
- Returns
- object Return object of the expected data type.
Definition at line 325 of file EthD.php.
References EthD\hexVal(), and EthD\typeMap().
◆ encodedHexVal()
◆ getPrimitiveTypes()
| static getPrimitiveTypes |
( |
| ) |
|
|
static |
◆ getSchemaType()
Get schema type of a primitive data type..
- Returns
- string Returns the CLass name of the type or The schema name if $schema is TRUE.
- Exceptions
-
Definition at line 302 of file EthD.php.
◆ getTypeArray()
Array of properties.
For primitive types the property is always 'value'.
- Returns
- array Return object of the expected data type.
Definition at line 340 of file EthD.php.
◆ hexVal()
◆ isPrimitive()
◆ reverseTypeMap()
| static reverseTypeMap |
( |
|
$class_name | ) |
|
|
static |
Reverse type SCHEMA_MAP (SCHEMA_MAP)
- Parameters
-
| string | $class_name | Classname of the type. |
- Returns
- string Schema name of the type.
- Exceptions
-
Definition at line 283 of file EthD.php.
◆ toArray()
Converts object to an array.
- Returns
- array Return object of the expected data type.
Implements EthDataTypeInterface.
Definition at line 353 of file EthD.php.
◆ typeMap()
| static typeMap |
( |
string |
$type | ) |
|
|
static |
◆ val()
Return un-prefixed and un-padded hex value.
Subclasses may return other types.
- Returns
- string Un-prefixed Hex value.
Definition at line 389 of file EthD.php.
◆ validateHexString()
| validateHexString |
( |
|
$val | ) |
|
Validate hex string for Hex letters.
- Todo:
- This might be moved to EthereumStatic.
- Parameters
-
| string | $val | Prefixed Hexadecimal String. |
- Returns
- bool Return TRUE if value contains only Hex digits.
- Exceptions
-
| InvalidArgumentException | If value contains non Hexadecimal characters. |
Definition at line 217 of file EthD.php.
Referenced by EthD\validate().
◆ $abi
◆ $value
The documentation for this class was generated from the following file: