Пример #1
0
 /**
  * ChannelUpdates constructor.
  * 
  * @param Database $db
  * @param string $channel
  */
 public function __construct(Database $db, string $channel = '')
 {
     parent::__construct($db);
     $this->channel = $channel;
     $channelConfig = \Airship\loadJSON(ROOT . '/config/channels.json');
     $this->channelPublicKey = new SignaturePublicKey(\Sodium\hex2bin($channelConfig[$channel]['publickey']));
     $this->urls = $channelConfig[$channel]['urls'];
 }
Пример #2
0
 /**
  * Files constructor.
  * @param Database $db
  */
 public function __construct(Database $db)
 {
     parent::__construct($db);
     $this->finfo = new \finfo(FILEINFO_MIME);
 }