Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
Select version
•
All
Classes
Namespaces
Files
Functions
Variables
Modules
Pages
SHHPost.php
Go to the documentation of this file.
1
<?php
11
namespace
Ethereum\DataType
;
12
18
class
SHHPost
extends
EthDataType
{
19
23
public
$topics
;
24
28
public
$payload
;
29
33
public
$priority
;
34
38
public
$ttl
;
39
43
public
$from
;
44
48
public
$to
;
49
58
public
function
__construct
(array
$topics
,
EthD
$payload
,
EthQ
$priority
,
EthQ
$ttl
,
EthD
$from
= null,
EthD
$to
= null) {
59
$this->topics =
$topics
;
60
$this->payload =
$payload
;
61
$this->priority =
$priority
;
62
$this->ttl =
$ttl
;
63
$this->from =
$from
;
64
$this->to =
$to
;
65
}
66
70
public
static
function
getTypeArray
() {
71
return
array(
72
'topics'
=>
'[EthD]'
,
73
'payload'
=>
'EthD'
,
74
'priority'
=>
'EthQ'
,
75
'ttl'
=>
'EthQ'
,
76
'from'
=>
'EthD'
,
77
'to'
=>
'EthD'
,
78
);
79
}
80
84
public
function
toArray
() {
85
$return = [];
86
(!is_null($this->topics)) ? $return[
'topics'
] =
Ethereum::valueArray
($this->topics,
'EthD'
) : array();
87
(!is_null($this->payload)) ? $return[
'payload'
] = $this->payload->hexVal() : NULL;
88
(!is_null($this->priority)) ? $return[
'priority'
] = $this->priority->hexVal() : NULL;
89
(!is_null($this->ttl)) ? $return[
'ttl'
] = $this->ttl->hexVal() : NULL;
90
(!is_null($this->from)) ? $return[
'from'
] = $this->from->hexVal() : NULL;
91
(!is_null($this->to)) ? $return[
'to'
] = $this->to->hexVal() : NULL;
92
return
$return;
93
}
94
}
Ethereum\DataType\SHHPost\$priority
$priority
Definition:
SHHPost.php:33
Ethereum\DataType\SHHPost\__construct
__construct(array $topics, EthD $payload, EthQ $priority, EthQ $ttl, EthD $from=null, EthD $to=null)
Definition:
SHHPost.php:58
Ethereum\DataType\SHHPost\$payload
$payload
Definition:
SHHPost.php:28
Ethereum\DataType\SHHPost\$ttl
$ttl
Definition:
SHHPost.php:38
Ethereum\DataType\SHHPost\getTypeArray
static getTypeArray()
Definition:
SHHPost.php:70
Ethereum\DataType\SHHPost\$from
$from
Definition:
SHHPost.php:43
Ethereum\DataType
Definition:
Block.php:11
Ethereum\Ethereum\valueArray
static valueArray(array $values, string $typeClass)
Definition:
Ethereum.php:571
Ethereum\DataType\SHHPost
Definition:
SHHPost.php:18
Ethereum\DataType\EthQ
Definition:
EthQ.php:14
Ethereum\DataType\SHHPost\toArray
toArray()
Definition:
SHHPost.php:84
Ethereum\DataType\SHHPost\$to
$to
Definition:
SHHPost.php:48
Ethereum\DataType\EthDataType
Definition:
EthDataType.php:44
Ethereum\DataType\SHHPost\$topics
$topics
Definition:
SHHPost.php:23
Ethereum\DataType\EthD
Definition:
EthD.php:15
src
DataType
SHHPost.php
Generated by
1.8.13