| 1 | <?php |
||
| 12 | class VarString extends AbstractType |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var VarInt |
||
| 16 | */ |
||
| 17 | private $varint; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param VarInt $varInt |
||
| 21 | */ |
||
| 22 | 22 | public function __construct(VarInt $varInt) |
|
| 27 | |||
| 28 | /** |
||
| 29 | * {@inheritdoc} |
||
| 30 | * @see \BitWasp\Buffertools\Types\TypeInterface::write() |
||
| 31 | */ |
||
| 32 | 12 | public function write($buffer): string |
|
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | * @see \BitWasp\Buffertools\Types\TypeInterface::write() |
||
| 45 | * @param Parser $parser |
||
| 46 | * @return \BitWasp\Buffertools\BufferInterface |
||
| 47 | * @throws \BitWasp\Buffertools\Exceptions\ParserOutOfRange |
||
| 48 | * @throws \Exception |
||
| 49 | */ |
||
| 50 | 14 | public function read(Parser $parser): BufferInterface |
|
| 64 | } |
||
| 65 |