Inheritance diagram for EthDataType:
Collaboration diagram for EthDataType:Public Member Functions | |
| getProperty (string $property='value', bool $returnHexVal=false) | |
| setValue ($val, array $params=[]) | |
| getClassName () | |
Public Member Functions inherited from EthDataTypeInterface | |
| toArray () | |
Static Public Member Functions | |
| const static | getClassByAbi (string $abiType) |
| static | getDataLengthType () |
| static | isPrimitive () |
| static | getTypeClass (string $type, bool $typed_constructor=false) |
| static | getAllTypeClasses () |
Static Public Member Functions inherited from EthereumStatic | |
| static | getMethodSignature ($input) |
| static | phpKeccak256 ($string) |
| static | sha3 ($string) |
| static | isValidFunction ($input) |
| static | getDefinition () |
| static | isValidHexQuantity ($str) |
| static | isValidHexData ($str) |
| static | isValidAddress ($address, $throw=false) |
| static | hasHexPrefix ($str) |
| static | removeHexPrefix ($str) |
| static | ensureHexPrefix ($str) |
| static | convertCurrency (float $amount, string $from='wei', string $to='ether') |
Base Class for all Data types.
Definition at line 44 of file EthDataType.php.
|
static |
Returns array of all existing data type class names.
Definition at line 311 of file EthDataType.php.
References $schema, EthereumStatic\getDefinition(), and EthD\getPrimitiveTypes().
Here is the call graph for this function:
|
static |
Get PHP-class by ABI.
| string | $abiType | Ethereum ABI type. See https://solidity.readthedocs.io/en/develop/abi-spec.html#types |
new $class($myVal)Definition at line 131 of file EthDataType.php.
| getClassName | ( | ) |
Get type class name.
Definition at line 252 of file EthDataType.php.
|
static |
Every Data class is 'static' or 'dynamic'.
Implements EthDataTypeInterface.
Definition at line 161 of file EthDataType.php.
| getProperty | ( | string | $property = 'value', |
| bool | $returnHexVal = false |
||
| ) |
Get hexadecimal representation of $value.
| string | $property | Name of the property. |
| bool | $returnHexVal | Set to TRUE to get the hexadecimal value. |
Implements EthDataTypeInterface.
Definition at line 197 of file EthDataType.php.
|
static |
Determine type class name for primitive and complex data types.
| string | $type | Type containing Schema name. Might be "[D20]" to indicate an array |
| bool | $typed_constructor | If true this function will return "array" for types of array($type), instead of $type. |
Implements EthDataTypeInterface.
Definition at line 274 of file EthDataType.php.
References EthD\typeMap().
Referenced by Ethereum\__call(), and Ethereum\handleFilterChangeValues().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Check if Type is a primitive type.
Primitive types are implemented manually, while the complex types are generated with php scripts/generate-complex-datatypes.php using resources/ethjs-schema.json['objects'] as a source.
Implements EthDataTypeInterface.
Definition at line 176 of file EthDataType.php.
| setValue | ( | $val, | |
| array | $params = [] |
||
| ) |
Validation is implemented in subclasses.
| mixed | $val | Value to set. |
| array | $params | Array with optional keyed arguments. |
Implements EthDataTypeInterface.
Definition at line 233 of file EthDataType.php.
Referenced by EthD\__construct().
Here is the caller graph for this function: