id = $result->getString(0); $this->torrentId = $result->getString(1); $this->length = $result->getInteger(2); $this->path = $result->getString(3); } public function getId(): string { return $this->id; } public function getTorrentId(): string { return $this->torrentId; } public function getLength(): int { return $this->length; } public function getPath(): string { return $this->path; } public function bencodeSerialise(): mixed { return [ 'length' => $this->length, 'path' => explode('/', $this->path), ]; } }