|
| __construct (?Options $options=null) |
|
| addRow (Row $row) |
| Appends a row to the end of the stream.
|
|
| addRows (array $rows) |
| Appends the rows to the end of the stream.
|
|
| close () |
| Closes the writer.
|
|
| getOptions () |
|
| getWrittenRowCount () |
|
| openToBrowser ($outputFileName) |
| @codeCoverageIgnore
|
|
| openToBrowser (string $outputFileName) |
| Initializes the writer and opens it to accept data.
|
|
| openToFile ($outputFilePath) |
|
| openToFile (string $outputFilePath) |
|
| setCreator (string $creator) |
| Set document creator.
|
|
|
| addRowToWriter (Row $row) |
| Adds a row to the currently opened writer.
|
|
| closeWriter () |
| Closes the CSV streamer, preventing any additional writing.
|
|
| openWriter () |
| Opens the CSV streamer and makes it ready to accept data.
|
|
|
string string | $creator = 'OpenSpout' |
| document creator
|
|
resource file home runner work phpdoc phpdoc moodle lib openspout src Writer AbstractWriter php | $filePointer |
| Pointer to the file/stream we will write to.
|
|
|
string file home runner work phpdoc phpdoc moodle lib openspout src Writer CSV Writer php static string | $headerContentType = 'text/csv; charset=UTF-8' |
| Content-Type value for the header.
|
|
◆ addRow()
OpenSpout\Writer\AbstractWriter::addRow |
( |
Row | $row | ) |
|
|
finalinherited |
Appends a row to the end of the stream.
- Parameters
-
Row | $row | The row to be appended to the stream |
- Exceptions
-
Exception\WriterNotOpenedException | If the writer has not been opened yet |
IOException | If unable to write data |
Implements OpenSpout\Writer\WriterInterface.
◆ addRows()
OpenSpout\Writer\AbstractWriter::addRows |
( |
array | $rows | ) |
|
|
finalinherited |
Appends the rows to the end of the stream.
- Parameters
-
Row[] | $rows | The rows to be appended to the stream |
- Exceptions
-
InvalidArgumentException | If the input param is not valid |
Exception\WriterNotOpenedException | If the writer has not been opened yet |
IOException | If unable to write data |
Implements OpenSpout\Writer\WriterInterface.
◆ addRowToWriter()
OpenSpout\Writer\CSV\Writer::addRowToWriter |
( |
Row | $row | ) |
|
|
protected |
Adds a row to the currently opened writer.
- Parameters
-
Row | $row | The row containing cells and styles |
- Exceptions
-
Reimplemented from OpenSpout\Writer\AbstractWriter.
◆ close()
OpenSpout\Writer\AbstractWriter::close |
( |
| ) |
|
|
finalinherited |
◆ closeWriter()
OpenSpout\Writer\CSV\Writer::closeWriter |
( |
| ) |
|
|
protected |
Closes the CSV streamer, preventing any additional writing.
If set, sets the headers and redirects output to the browser.
Reimplemented from OpenSpout\Writer\AbstractWriter.
◆ getWrittenRowCount()
OpenSpout\Writer\AbstractWriter::getWrittenRowCount |
( |
| ) |
|
|
finalinherited |
◆ openToBrowser() [1/2]
OpenSpout\Writer\AbstractWriter::openToBrowser |
( |
| $outputFileName | ) |
|
|
finalinherited |
@codeCoverageIgnore
- Parameters
-
◆ openToBrowser() [2/2]
OpenSpout\Writer\WriterInterface::openToBrowser |
( |
string | $outputFileName | ) |
|
|
inherited |
Initializes the writer and opens it to accept data.
By using this method, the data will be outputted directly to the browser.
- Parameters
-
string | $outputFileName | Name of the output file that will contain the data. If a path is passed in, only the file name will be kept |
- Exceptions
-
◆ openWriter()
OpenSpout\Writer\CSV\Writer::openWriter |
( |
| ) |
|
|
protected |
◆ setCreator()
OpenSpout\Writer\AbstractWriter::setCreator |
( |
string | $creator | ) |
|
|
finalinherited |
The documentation for this class was generated from the following file:
- lib/openspout/src/Writer/CSV/Writer.php