| 1 | <?php |
||
| 6 | final class PartialItem implements ItemInterface |
||
| 7 | { |
||
| 8 | |||
| 9 | /** |
||
| 10 | * @var ItemInterface |
||
| 11 | */ |
||
| 12 | private $item; |
||
| 13 | /** |
||
| 14 | * @var int |
||
| 15 | */ |
||
| 16 | private $firstByte; |
||
| 17 | /** |
||
| 18 | * @var int |
||
| 19 | */ |
||
| 20 | private $lastByte; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * PartialItem constructor. |
||
| 24 | * @param ItemInterface $item |
||
| 25 | * @param int $firstByte |
||
| 26 | * @param int $lastByte |
||
| 27 | */ |
||
| 28 | public function __construct(ItemInterface $item, int $firstByte, int $lastByte) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * @return string |
||
| 37 | */ |
||
| 38 | public function getName(): string |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @return string |
||
| 45 | */ |
||
| 46 | public function __toString(): string |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @param ItemInterface $item |
||
| 57 | * @param string $partial |
||
| 58 | * @return PartialItem |
||
| 59 | */ |
||
| 60 | public static function fromString(ItemInterface $item, string $partial): self |
||
| 70 | } |