29 lines
606 B
PHP
29 lines
606 B
PHP
<?php
|
|
namespace Seria\Torrents;
|
|
|
|
use Index\Data\IDbResult;
|
|
|
|
readonly class TorrentPieceInfo {
|
|
private string $id;
|
|
private string $torrentId;
|
|
private string $hash;
|
|
|
|
public function __construct(IDbResult $result) {
|
|
$this->id = $result->getString(0);
|
|
$this->torrentId = $result->getString(1);
|
|
$this->hash = $result->getString(2);
|
|
}
|
|
|
|
public function getId(): string {
|
|
return $this->id;
|
|
}
|
|
|
|
public function getTorrentId(): string {
|
|
return $this->torrentId;
|
|
}
|
|
|
|
public function getHash(): string {
|
|
return $this->hash;
|
|
}
|
|
}
|