| 1 | <?php |
||
| 17 | abstract class AbstractIntegerReader extends AbstractReader |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var boolean |
||
| 21 | */ |
||
| 22 | protected $signed; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Is signed |
||
| 26 | * |
||
| 27 | * @return boolean |
||
| 28 | */ |
||
| 29 | public function isSigned() |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Set signed |
||
| 40 | * |
||
| 41 | * @param boolean $signed |
||
| 42 | * |
||
| 43 | * @return $this |
||
| 44 | */ |
||
| 45 | public function setSigned($signed) |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Read integer data from the stream |
||
| 53 | * |
||
| 54 | * @return int |
||
| 55 | */ |
||
| 56 | public function read() |
||
| 64 | |||
| 65 | /** |
||
| 66 | * Read unsigned integer data from the stream |
||
| 67 | * |
||
| 68 | * @return int |
||
| 69 | */ |
||
| 70 | abstract protected function readUnsigned(); |
||
| 71 | |||
| 72 | /** |
||
| 73 | * Read signed integer data from the stream |
||
| 74 | * |
||
| 75 | * @return int |
||
| 76 | */ |
||
| 77 | abstract protected function readSigned(); |
||
| 78 | } |
||
| 79 |