Moodle PHP Documentation 4.1
Moodle 4.1.19+ (Build: 20250711) (5f47dc23ffc)
Box\Spout\Writer\Common\Creator\WriterEntityFactory Class Reference

Static Public Member Functions

static createCell ($cellValue, Style $cellStyle=null)
 
static createCSVWriter ()
 This creates an instance of a CSV writer.
 
static createODSWriter ()
 This creates an instance of a ODS writer.
 
static createRow (array $cells=[], Style $rowStyle=null)
 
static createRowFromArray (array $cellValues=[], Style $rowStyle=null)
 
static createWriter ($writerType)
 This creates an instance of the appropriate writer, given the type of the file to be written.
 
static createWriterFromFile (string $path)
 This creates an instance of the appropriate writer, given the extension of the file to be written.
 
static createXLSXWriter ()
 This creates an instance of a XLSX writer.
 

Member Function Documentation

◆ createCell()

static Box\Spout\Writer\Common\Creator\WriterEntityFactory::createCell ( $cellValue,
Style $cellStyle = null )
static
Parameters
mixed$cellValue
Style | null$cellStyle
Return values
Cell

◆ createCSVWriter()

static Box\Spout\Writer\Common\Creator\WriterEntityFactory::createCSVWriter ( )
static

This creates an instance of a CSV writer.

Return values
Box\Spout\Writer\CSV\Writer

◆ createODSWriter()

static Box\Spout\Writer\Common\Creator\WriterEntityFactory::createODSWriter ( )
static

This creates an instance of a ODS writer.

Return values
Box\Spout\Writer\ODS\Writer

◆ createRow()

static Box\Spout\Writer\Common\Creator\WriterEntityFactory::createRow ( array $cells = [],
Style $rowStyle = null )
static
Parameters
Cell[]$cells
Style | null$rowStyle
Return values
Row

◆ createRowFromArray()

static Box\Spout\Writer\Common\Creator\WriterEntityFactory::createRowFromArray ( array $cellValues = [],
Style $rowStyle = null )
static
Parameters
array$cellValues
Style | null$rowStyle
Return values
Row

◆ createWriter()

static Box\Spout\Writer\Common\Creator\WriterEntityFactory::createWriter ( $writerType)
static

This creates an instance of the appropriate writer, given the type of the file to be written.

Parameters
string$writerTypeType of the writer to instantiate
Exceptions
Box\Spout\Common\Exception\UnsupportedTypeException
Return values
WriterInterface

◆ createWriterFromFile()

static Box\Spout\Writer\Common\Creator\WriterEntityFactory::createWriterFromFile ( string $path)
static

This creates an instance of the appropriate writer, given the extension of the file to be written.

Parameters
string$pathThe path to the spreadsheet file. Supported extensions are .csv, .ods and .xlsx
Exceptions
Box\Spout\Common\Exception\UnsupportedTypeException
Return values
WriterInterface

◆ createXLSXWriter()

static Box\Spout\Writer\Common\Creator\WriterEntityFactory::createXLSXWriter ( )
static

This creates an instance of a XLSX writer.

Return values
Box\Spout\Writer\XLSX\Writer

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