1 | <?php |
||
11 | abstract class AbstractSignedInt extends AbstractType implements SignedIntInterface |
||
12 | { |
||
13 | /** |
||
14 | * @param int $byteOrder |
||
15 | */ |
||
16 | 72 | public function __construct(int $byteOrder = ByteOrder::BE) |
|
20 | |||
21 | /** |
||
22 | * @param int|string $integer |
||
23 | * @return string |
||
24 | */ |
||
25 | public function writeBits($integer): string |
||
34 | |||
35 | /** |
||
36 | * @param Parser $parser |
||
37 | * @return int|string |
||
38 | * @throws \BitWasp\Buffertools\Exceptions\ParserOutOfRange |
||
39 | * @throws \Exception |
||
40 | */ |
||
41 | 12 | public function readBits(Parser $parser) |
|
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | * @see \BitWasp\Buffertools\Types\TypeInterface::write() |
||
68 | */ |
||
69 | 12 | public function write($integer): string |
|
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | * @see \BitWasp\Buffertools\Types\TypeInterface::read() |
||
89 | */ |
||
90 | 12 | public function read(Parser $binary) |
|
94 | } |
||
95 |