Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
SHHFilter.php
Go to the documentation of this file.
1 <?php
11 namespace Ethereum\DataType;
12 
18 class SHHFilter extends EthDataType {
19 
23  public $topics;
24 
28  public $to;
29 
34  public function __construct(array $topics, EthD $to = null) {
35  $this->topics = $topics;
36  $this->to = $to;
37  }
38 
42  public static function getTypeArray() {
43  return array(
44  'topics' => '[EthD]',
45  'to' => 'EthD',
46  );
47  }
48 
52  public function toArray() {
53  $return = [];
54  (!is_null($this->topics)) ? $return['topics'] = Ethereum::valueArray($this->topics, 'EthD') : array();
55  (!is_null($this->to)) ? $return['to'] = $this->to->hexVal() : NULL;
56  return $return;
57  }
58 }
__construct(array $topics, EthD $to=null)
Definition: SHHFilter.php:34
static valueArray(array $values, string $typeClass)
Definition: Ethereum.php:571