Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
EthSyncing.php
Go to the documentation of this file.
1 <?php
11 namespace Ethereum\DataType;
12 
18 class EthSyncing extends EthDataType {
19 
24 
28  public $currentBlock;
29 
33  public $highestBlock;
34 
40  public function __construct(EthQ $startingBlock = null, EthQ $currentBlock = null, EthQ $highestBlock = null) {
41  $this->startingBlock = $startingBlock;
42  $this->currentBlock = $currentBlock;
43  $this->highestBlock = $highestBlock;
44  }
45 
49  public static function getTypeArray() {
50  return array(
51  'startingBlock' => 'EthQ',
52  'currentBlock' => 'EthQ',
53  'highestBlock' => 'EthQ',
54  );
55  }
56 
60  public function toArray() {
61  $return = [];
62  (!is_null($this->startingBlock)) ? $return['startingBlock'] = $this->startingBlock->hexVal() : NULL;
63  (!is_null($this->currentBlock)) ? $return['currentBlock'] = $this->currentBlock->hexVal() : NULL;
64  (!is_null($this->highestBlock)) ? $return['highestBlock'] = $this->highestBlock->hexVal() : NULL;
65  return $return;
66  }
67 }
__construct(EthQ $startingBlock=null, EthQ $currentBlock=null, EthQ $highestBlock=null)
Definition: EthSyncing.php:40