1 | <?php |
||
30 | trait IsSeekable |
||
31 | { |
||
32 | /** |
||
33 | * Seek to specific line (beginning). |
||
34 | * |
||
35 | * Seek to the line specified by $offset, starting from the $whence line. |
||
36 | * |
||
37 | * @param int $offset Offset to seek to |
||
38 | * @param int $whence Position from whence to seek from |
||
39 | * @param string $eol The line terminator string/char |
||
40 | * @return boolean True if successful |
||
41 | * @throws CSVelte\Exception\NotYetImplementedException because it isn't |
||
42 | * implemented yet |
||
43 | */ |
||
44 | public function seekLine($offset, $whence = SEEK_SET, $eol = PHP_EOL) |
||
45 | { |
||
46 | throw new NotYetImplementedException("This method not yet implemented."); |
||
47 | } |
||
48 | |||
49 | /** |
||
50 | * Assert that this file/stream object is readable. |
||
51 | * |
||
52 | * @return void |
||
53 | * @throws CSVelte\Exception\IOException if stream isn't readable |
||
54 | */ |
||
55 | 9 | protected function assertIsSeekable() |
|
61 | |||
62 | abstract public function getName(); |
||
63 | |||
64 | abstract public function isSeekable(); |
||
65 | |||
66 | abstract public function seek($offset, $whence); |
||
67 | |||
68 | } |
||
69 |