|
Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
Base class for dataformat. More...
Public Member Functions | |
| close_output () | |
| Write the end of the file. | |
| close_sheet ($columns) | |
| Write the end of the sheet containing the data. More... | |
| get_extension () | |
| Get the file extension. More... | |
| send_http_headers () | |
| Output file headers to initialise the download of the file. | |
| set_filename ($filename) | |
| Set download filename base. More... | |
| set_sheettitle ($title) | |
| Set the title of the worksheet inside a spreadsheet. More... | |
| start_output () | |
| Write the start of the file. | |
| start_sheet ($columns) | |
| Write the start of the sheet we will be adding data to. More... | |
| write_record ($record, $rownum) | |
| Write a single record. More... | |
Protected Attributes | |
| $extension | $extension = ".txt" |
| $filename | $filename = '' |
| $mimetype | $mimetype = "text/plain" |
Base class for dataformat.
@subpackage dataformat
| core\dataformat\base::close_sheet | ( | $columns | ) |
Write the end of the sheet containing the data.
| array | $columns |
Reimplemented in dataformat_json\writer, and dataformat_html\writer.
| core\dataformat\base::get_extension | ( | ) |
Get the file extension.
| string | file extension |
| core\dataformat\base::set_filename | ( | $filename | ) |
Set download filename base.
| string | $filename |
| core\dataformat\base::set_sheettitle | ( | $title | ) |
Set the title of the worksheet inside a spreadsheet.
For some formats this will be ignored.
| string | $title |
Reimplemented in core\dataformat\spout_base, dataformat_ods\writer, and dataformat_excel\writer.
| core\dataformat\base::start_sheet | ( | $columns | ) |
Write the start of the sheet we will be adding data to.
| array | $columns |
Reimplemented in core\dataformat\spout_base, dataformat_pdf\writer, dataformat_json\writer, and dataformat_html\writer.
|
abstract |
Write a single record.
| array | $record | |
| int | $rownum |
Reimplemented in core\dataformat\spout_base, dataformat_pdf\writer, dataformat_json\writer, and dataformat_html\writer.