id; } /** Returns torrent info hash as HEX string */ public function getInfoHash(): string { if (null === $this->infoHashHexCache) { $this->infoHashHexCache = bin2hex(stream_get_contents($this->infoHash)); rewind($this->infoHash); } return $this->infoHashHexCache; } public function getName(): string { return $this->name; } /** Returns torrent files total size in bytes */ public function getTotalSize(): int { return $this->totalSize; } /** Returns torrent discovery timestamp */ public function getDiscoveredOn(): int { return $this->discoveredOn; } /** * @return File[]|ArrayCollection */ public function getFiles(): iterable { return $this->files; } }