1 | <?php |
||
23 | trait IsSeekable |
||
24 | { |
||
25 | /** |
||
26 | * Seek to specific line (beginning). |
||
27 | * |
||
28 | * Seek to the line specified by $offset, starting from the $whence line. |
||
29 | * |
||
30 | * @param int $offset Offset to seek to |
||
31 | * @param int $whence Position from whence to seek from |
||
32 | * @param string $eol The line terminator string/char |
||
33 | * |
||
34 | * @throws NotYetImplementedException |
||
35 | * |
||
36 | * @return bool True if successful |
||
37 | */ |
||
38 | 1 | public function seekLine($offset, $whence = SEEK_SET, $eol = PHP_EOL) |
|
47 | |||
48 | abstract public function isSeekable(); |
||
49 | |||
50 | abstract public function seek($offset, $whence = SEEK_SET); |
||
51 | |||
52 | /** |
||
53 | * Assert that this file/stream object is readable. |
||
54 | * |
||
55 | * @throws IOException |
||
56 | */ |
||
57 | 11 | protected function assertIsSeekable() |
|
63 | } |
||
64 |