/**
  * Встановити дані файла торента
  * @param $torrent
  * @throws TorrentException
  */
 protected function setBinaryTorrent($torrent)
 {
     try {
         TorrentDecoder::decode($this, $torrent);
     } catch (\Exception $e) {
         throw new TorrentException('NOT_FORMAT_TORRENT');
     }
 }
Ejemplo n.º 2
0
 /**
  * Отримати вміст torrent файла
  * @return string
  */
 public function getBinaryTorrent()
 {
     return TorrentDecoder::encode($this);
 }