| 1 | <?php |
||
| 5 | class SheetFile |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * @var resource |
||
| 9 | */ |
||
| 10 | private $filePointer; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | private $filePath; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * SheetFile constructor. |
||
| 19 | * |
||
| 20 | * @throws \RuntimeException |
||
| 21 | */ |
||
| 22 | 14 | public function __construct() |
|
| 29 | |||
| 30 | /** |
||
| 31 | * Write a single string. |
||
| 32 | * |
||
| 33 | * @param $string |
||
| 34 | */ |
||
| 35 | 13 | public function fwrite($string) |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Rewind file (to write header and column widths). |
||
| 46 | */ |
||
| 47 | 5 | public function rewind() |
|
| 55 | |||
| 56 | /** |
||
| 57 | * Return full path of the file. |
||
| 58 | * |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | 4 | public function getFilePath() |
|
| 65 | |||
| 66 | /** |
||
| 67 | * Close file pointer and delete file. |
||
| 68 | */ |
||
| 69 | 14 | public function __destruct() |
|
| 78 | } |
||
| 79 |