Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
Select version
•
All
Classes
Namespaces
Files
Functions
Variables
Modules
Pages
RlpCollection.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Ethereum\RLP
;
4
use
Ethereum\RLP\RlpItem
;
5
6
7
class
RlpCollection
extends
Rlp
{
8
9
protected
$rlpItems
= [];
10
11
public
function
toArray
() {
12
$return = [];
13
foreach
($this->rlpItems as $item) {
14
$return[] = $item->get();
15
}
16
return
$return;
17
}
18
19
public
function
get
() {
20
return
$this->rlpItems
;
21
}
22
23
public
function
add
(
RlpItem
$item) {
24
$this->rlpItems[] = $item;
25
}
26
}
Ethereum\RLP\RlpItem
Definition:
RlpItem.php:6
Ethereum\RLP\RlpCollection\toArray
toArray()
Definition:
RlpCollection.php:11
RlpItem
Ethereum\RLP\RlpCollection\$rlpItems
$rlpItems
Definition:
RlpCollection.php:9
Ethereum\RLP
Definition:
Rlp.php:3
Ethereum\RLP\Rlp
Definition:
Rlp.php:18
Ethereum\RLP\RlpCollection
Definition:
RlpCollection.php:7
Ethereum\RLP\RlpCollection\add
add(RlpItem $item)
Definition:
RlpCollection.php:23
src
RLP
RlpCollection.php
Generated by
1.8.13