Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Attributes | List of all members
core\dataformat\spout_base Class Reference

Common Spout class for dataformat. More...

Inheritance diagram for core\dataformat\spout_base:
core\dataformat\base dataformat_csv\writer dataformat_excel\writer dataformat_ods\writer

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"
 
$renamecurrentsheet $renamecurrentsheet = false
 
$sheettitle $sheettitle
 
$spouttype $spouttype = ''
 
$writer $writer
 

Detailed Description

Common Spout class for dataformat.

@subpackage dataformat

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ close_sheet()

core\dataformat\base::close_sheet (   $columns)
inherited

Write the end of the sheet containing the data.

Parameters
array$columns

Reimplemented in dataformat_json\writer, and dataformat_html\writer.

◆ get_extension()

core\dataformat\base::get_extension ( )
inherited

Get the file extension.

Return values
stringfile extension

◆ set_filename()

core\dataformat\base::set_filename (   $filename)
inherited

Set download filename base.

Parameters
string$filename

◆ set_sheettitle()

core\dataformat\spout_base::set_sheettitle (   $title)

Set the title of the worksheet inside a spreadsheet.

For some formats this will be ignored.

Parameters
string$title

Reimplemented from core\dataformat\base.

Reimplemented in dataformat_ods\writer, and dataformat_excel\writer.

◆ start_sheet()

core\dataformat\spout_base::start_sheet (   $columns)

Write the start of the sheet we will be adding data to.

Parameters
array$columns

Reimplemented from core\dataformat\base.

◆ write_record()

core\dataformat\spout_base::write_record (   $record,
  $rownum 
)

Write a single record.

Parameters
object$record
int$rownum

Reimplemented from core\dataformat\base.


The documentation for this class was generated from the following file: