1 | <?php |
||
12 | abstract class AbstractStream |
||
13 | { |
||
14 | /** |
||
15 | * @var \PhpBio\BitBuffer Object that reads and writes data from|to file|memory stream. |
||
16 | * */ |
||
17 | protected $buffer; |
||
18 | |||
19 | /** |
||
20 | * Implementations should init buffer itself by given value. |
||
21 | * |
||
22 | * @param string $path Value to init buffer. |
||
23 | */ |
||
24 | abstract public function __construct($path); |
||
25 | |||
26 | /** |
||
27 | * Getter for $buffer property. |
||
28 | * |
||
29 | * @return \PhpBio\BitBuffer Object that reads data from file|memory stream. |
||
30 | */ |
||
31 | 26 | public function getBuffer() |
|
35 | |||
36 | /** |
||
37 | * Move internal pointer by given amount of bits ahead without reading dta. |
||
38 | * |
||
39 | * @param int $size Amount of bits to be skipped. |
||
40 | */ |
||
41 | 7 | public function skip($size) |
|
45 | } |
For interface and abstract methods, it is impossible to infer the return type from the immediate code. In these cases, it is generally advisible to explicitly annotate these methods with a
@return
doc comment to communicate to implementors of these methods what they are expected to return.