Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
Select version
•
All
Classes
Namespaces
Files
Functions
Variables
Modules
Pages
RlpItem.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ethereum\RLP
;
4
5
6
class
RlpItem
extends
Rlp
7
{
8
9
// Data String.
10
protected
$rlpData
;
11
12
// StrLength of tha actual Data.
13
protected
$dataStrLength
;
14
15
// Padded strLength of arg incl prefix.
16
protected
$paddedStrLength
;
17
18
public
function
__construct
($data)
19
{
20
$dataLength = self::getStringLengthAt($data, 0);
21
$this->dataStrLength = $dataLength;
22
$this->paddedStrLength = 64 + self::paddedLength($dataLength);
23
$this->rlpData = substr($data, 64, $this->dataStrLength);
24
}
25
26
public
function
getCharLength
()
27
{
28
return
$this->paddedStrLength
;
29
}
30
31
public
function
get
()
32
{
33
return
$this->rlpData
;
34
}
35
36
}
Ethereum\RLP\RlpItem
Definition:
RlpItem.php:6
Ethereum\RLP\RlpItem\__construct
__construct($data)
Definition:
RlpItem.php:18
Ethereum\RLP
Definition:
Rlp.php:3
Ethereum\RLP\RlpItem\$rlpData
$rlpData
Definition:
RlpItem.php:10
Ethereum\RLP\Rlp
Definition:
Rlp.php:18
Ethereum\RLP\RlpItem\$paddedStrLength
$paddedStrLength
Definition:
RlpItem.php:16
Ethereum\RLP\RlpItem\$dataStrLength
$dataStrLength
Definition:
RlpItem.php:13
Ethereum\RLP\RlpItem\getCharLength
getCharLength()
Definition:
RlpItem.php:26
src
RLP
RlpItem.php
Generated by
1.8.13