Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
SHHFilterChange.php
Go to the documentation of this file.
1 <?php
11 namespace Ethereum\DataType;
12 
19 
23  public $hash;
24 
28  public $from;
29 
33  public $to;
34 
38  public $expiry;
39 
43  public $ttl;
44 
48  public $sent;
49 
53  public $topics;
54 
58  public $payload;
59 
63  public $workProved;
64 
76  public function __construct(EthD $hash = null, EthD $from = null, EthD $to = null, EthQ $expiry = null, EthQ $ttl = null, EthQ $sent = null, array $topics = null, EthD $payload = null, EthQ $workProved = null) {
77  $this->hash = $hash;
78  $this->from = $from;
79  $this->to = $to;
80  $this->expiry = $expiry;
81  $this->ttl = $ttl;
82  $this->sent = $sent;
83  $this->topics = $topics;
84  $this->payload = $payload;
85  $this->workProved = $workProved;
86  }
87 
91  public static function getTypeArray() {
92  return array(
93  'hash' => 'EthD',
94  'from' => 'EthD',
95  'to' => 'EthD',
96  'expiry' => 'EthQ',
97  'ttl' => 'EthQ',
98  'sent' => 'EthQ',
99  'topics' => '[EthD]',
100  'payload' => 'EthD',
101  'workProved' => 'EthQ',
102  );
103  }
104 
108  public function toArray() {
109  $return = [];
110  (!is_null($this->hash)) ? $return['hash'] = $this->hash->hexVal() : NULL;
111  (!is_null($this->from)) ? $return['from'] = $this->from->hexVal() : NULL;
112  (!is_null($this->to)) ? $return['to'] = $this->to->hexVal() : NULL;
113  (!is_null($this->expiry)) ? $return['expiry'] = $this->expiry->hexVal() : NULL;
114  (!is_null($this->ttl)) ? $return['ttl'] = $this->ttl->hexVal() : NULL;
115  (!is_null($this->sent)) ? $return['sent'] = $this->sent->hexVal() : NULL;
116  (!is_null($this->topics)) ? $return['topics'] = Ethereum::valueArray($this->topics, 'EthD') : array();
117  (!is_null($this->payload)) ? $return['payload'] = $this->payload->hexVal() : NULL;
118  (!is_null($this->workProved)) ? $return['workProved'] = $this->workProved->hexVal() : NULL;
119  return $return;
120  }
121 }
__construct(EthD $hash=null, EthD $from=null, EthD $to=null, EthQ $expiry=null, EthQ $ttl=null, EthQ $sent=null, array $topics=null, EthD $payload=null, EthQ $workProved=null)
static valueArray(array $values, string $typeClass)
Definition: Ethereum.php:571