Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
JSON data format writer. 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... | |
Public Attributes | |
$extension | $extension = ".json" |
$mimetype | $mimetype = "application/json" |
$sheetdatadded | $sheetdatadded = false |
$sheetstarted | $sheetstarted = false |
Protected Attributes | |
$filename | $filename = '' |
JSON data format writer.
dataformat_json\writer::close_sheet | ( | $columns | ) |
Write the end of the sheet containing the data.
array | $columns |
Reimplemented from core\dataformat\base.
|
inherited |
Get the file extension.
string | file extension |
|
inherited |
Set download filename base.
string | $filename |
|
inherited |
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.
dataformat_json\writer::start_sheet | ( | $columns | ) |
Write the start of the sheet we will be adding data to.
array | $columns |
Reimplemented from core\dataformat\base.
dataformat_json\writer::write_record | ( | $record, | |
$rownum | |||
) |