Esempio n. 1
0
 /**
  * @param string $type
  * @param string $url
  * @param string $blockChain
  */
 public function __construct($type, $url, $blockChain = Chain::BLOCK_CHAIN_BITCOIN)
 {
     if (!Notification::validateType($type)) {
         throw new \Nette\InvalidArgumentException("Unknown type {$type}.");
     }
     if (!Chain::validateBlockChain($blockChain)) {
         throw new \Nette\InvalidArgumentException("Unknown block chain {$blockChain}.");
     }
     $this->parameters['type'] = $type;
     $this->parameters['url'] = $url;
     $this->parameters['block_chain'] = $blockChain;
 }
Esempio n. 2
0
 /**
  * @param array $notification
  */
 protected function __construct(array $notification)
 {
     parent::__construct($notification);
     $this->transaction = new Transaction($notification['payload']['transaction']);
 }
Esempio n. 3
0
 /**
  * @param array $notification
  */
 protected function __construct(array $notification)
 {
     parent::__construct($notification);
     $this->block = new Block($notification['payload']['block']);
 }