| 1 | <?php |
||
| 10 | class SheetFile |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var resource |
||
| 14 | */ |
||
| 15 | private $filePointer; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var string |
||
| 19 | */ |
||
| 20 | private $filePath; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * SheetFile constructor. |
||
| 24 | * |
||
| 25 | * @throws \RuntimeException |
||
| 26 | */ |
||
| 27 | 8 | public function __construct() |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Write a single string. |
||
| 37 | * |
||
| 38 | * @param $string |
||
| 39 | */ |
||
| 40 | 8 | public function fwrite($string) |
|
| 46 | |||
| 47 | /** |
||
| 48 | * Rewind file (to write header and column widths). |
||
| 49 | */ |
||
| 50 | 2 | public function rewind() |
|
| 56 | |||
| 57 | /** |
||
| 58 | * Return full path of the file. |
||
| 59 | * |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | 2 | public function getFilePath() |
|
| 66 | |||
| 67 | /** |
||
| 68 | * Close file pointer and delete file. |
||
| 69 | */ |
||
| 70 | 8 | public function __destruct() |
|
| 76 | } |
||
| 77 |