Public Member Functions | |
__construct ($val, array $params=[]) | |
validate ($val, array $params) | |
hexVal () | |
hexValUnpadded () | |
getLength ($abi) | |
isNegative ($abi=false) | |
isLargeNumber (Math_BigInteger $val) | |
val () | |
encodedHexVal () | |
isNotNull () | |
getAbi () | |
Public Member Functions inherited from EthD | |
const const | __construct ($val, array $params=[]) |
convertByAbi ($abiType) | |
validate ($val, array $params) | |
validateHexString ($val) | |
convertTo ($type) | |
toArray () | |
hexVal () | |
encodedHexVal () | |
val () | |
Public Member Functions inherited from EthDataType | |
getProperty (string $property='value', bool $returnHexVal=false) | |
setValue ($val, array $params=[]) | |
getClassName () | |
Static Public Member Functions | |
static | getValidLengths () |
static | getDataLengthType () |
Static Public Member Functions inherited from EthD | |
static | getPrimitiveTypes () |
static | isPrimitive () |
static | typeMap (string $type) |
static | reverseTypeMap ($class_name) |
static | getSchemaType () |
static | getTypeArray () |
Static Public Member Functions inherited from EthDataType | |
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') |
Public Attributes | |
$value | |
const | HEXPADDING = 64 |
Protected Member Functions | |
getAbiFromNumber (Math_BigInteger $number) | |
validateAbi ($abi) | |
Static Protected Member Functions | |
static | splitAbi ($abi) |
Protected Attributes | |
$abi | |
Protected Attributes inherited from EthD | |
$value | |
$abi | |
__construct | ( | $val, | |
array | $params = [] |
||
) |
encodedHexVal | ( | ) |
Definition at line 339 of file EthQ.php.
References EthQ\hexVal().
getAbi | ( | ) |
|
protected |
getAbiFromIntVal().
Math_BigInteger | $number | "0x" prefixed Hexadecimal value. |
Definition at line 146 of file EthQ.php.
References EthQ\getValidLengths().
Referenced by EthQ\validate().
|
static |
getLength | ( | $abi | ) |
Implement getLength().
Definition at line 278 of file EthQ.php.
References EthQ\$abi, and EthQ\splitAbi().
Referenced by EthQ\validate().
|
static |
Valid number lengths.
Array of valid M's, where % 8 == 0 && 8 <= M <= 256
Definition at line 375 of file EthQ.php.
Referenced by EthQ\getAbiFromNumber().
hexVal | ( | ) |
Implement hex value.
Exception |
Definition at line 246 of file EthQ.php.
References EthQ\$value.
Referenced by EthQ\encodedHexVal().
hexValUnpadded | ( | ) |
isLargeNumber | ( | Math_BigInteger | $val | ) |
Check if number is large.
Math_BigInteger | $val | Math_BigInteger value. |
Definition at line 314 of file EthQ.php.
Referenced by EthQ\val().
isNegative | ( | $abi = false | ) |
Implement hex value.
Definition at line 288 of file EthQ.php.
References EthQ\$abi, and EthQ\splitAbi().
|
staticprotected |
Split abi type into length and intType.
Definition at line 224 of file EthQ.php.
References EthQ\$abi.
Referenced by EthQ\getLength(), EthQ\isNegative(), and EthQ\validateAbi().
val | ( | ) |
Implement Integer value.
Definition at line 326 of file EthQ.php.
References EthQ\isLargeNumber().
validate | ( | $val, | |
array | $params | ||
) |
Implement validation.
string | number | $val | "0x"prefixed hexadecimal or number value. |
array | $params | Only $param['abi'] is relevant. |
Exception | If things are wrong. |
Definition at line 61 of file EthQ.php.
References EthQ\$abi, EthQ\getAbiFromNumber(), EthQ\getLength(), EthereumStatic\hasHexPrefix(), and EthQ\validateAbi().
|
protected |
Validate ABI.
See: https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI#types.
string | $abi | Valid Abi for number. E.g uint8, int160 ... |
InvalidArgumentException | If Abi don't match definition. |
Definition at line 193 of file EthQ.php.
References EthQ\$abi, and EthQ\splitAbi().
Referenced by EthQ\validate().
|
protected |
Abi of the content.
Definition at line 27 of file EthQ.php.
Referenced by EthQ\getAbi(), EthQ\getLength(), EthQ\isNegative(), EthQ\splitAbi(), EthQ\validate(), and EthQ\validateAbi().
$value |
Definition at line 20 of file EthQ.php.
Referenced by EthBlockParam\hexVal(), EthQ\hexVal(), EthBlockParam\isTag(), and EthBlockParam\val().