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