Public Member Functions | |
| __construct (ExportDataInterface $data, $filename= '') | |
| getInfo () | |
| setFilename ($filename) | |
| setTitle ($title) | |
| getTitle () | |
| getFilename () | |
| getData () | |
| getHeader ($page_id=0) | |
| setData (ExportDataInterface $data) | |
| formatColumn ($column, $format_code) | |
| compile ($page_id=NULL) | |
| export ($page_id=NULL) | |
| save ($filename= '', $page_id=NULL) | |
Data Fields | |
| $dependencies = TRUE | |
Protected Member Functions | |
| filenameSafe ($string, $options=array()) | |
Protected Attributes | |
| $export_data | |
| $title | |
| $filename | |
| $extension | |
| $output | |
| $header = array() | |
Class Exporter
| __construct | ( | ExportDataInterface $ | data, | |
| $ | filename = '' | |||
| ) |
Constructor
| ExportDataInterface | $data | |
| string | $filename (Optional) Defaults to ''. |
Reimplemented in CSVExporter, FlatTextExporter, TabTextExporter, and YAMLExporter.
| compile | ( | $ | page_id = NULL |
) | [abstract] |
Build $this->output in prep for export/save
This is the main method to be extended for the different exporters
Reimplemented in CSVExporter, FlatTextExporter, HTMLExporter, JSONExporter, MarkdownExporter, TextListExporter, XLSXExporter, XMLExporter, and YAMLExporter.
| export | ( | $ | page_id = NULL |
) |
Export data as a string
| mixed | $page_id (Optional) Defaults to NULL. Set this to export a single page. |
Implements ExporterInterface.
Reimplemented in XLSXExporter.
| filenameSafe | ( | $ | string, | |
| $ | options = array() | |||
| ) | [protected] |
Return a string as a safe filename
| string | $string The candidtate filename. | |
| array | $options
|
| formatColumn | ( | $ | column, | |
| $ | format_code | |||
| ) |
Format a single column with format by string
| string | $column | |
| string | $format_code
|
Implements ExporterInterface.
Reimplemented in XLSXExporter.
| getData | ( | ) |
| getFilename | ( | ) |
| getHeader | ( | $ | page_id = 0 |
) |
Return an array containing the header row values for a page
| mixed | $page_id (Optional) Defaults to 0. |
Implements ExporterInterface.
| getInfo | ( | ) |
Return info about this class
| type | $string description |
Implements ExporterInterface.
Reimplemented in CSVExporter, FlatTextExporter, JSONExporter, MarkdownExporter, TabTextExporter, TextListExporter, XLSXExporter, XMLExporter, and YAMLExporter.
| getTitle | ( | ) |
Implements ExporterInterface.
| save | ( | $ | filename = '', |
|
| $ | page_id = NULL | |||
| ) |
Save as a file to the server
| string | $filename The correct extension will be appended to this string | |
| mixed | $page_id (Optional) Defaults to NULL. Set this to export a single page. |
Implements ExporterInterface.
Reimplemented in XLSXExporter.
| setData | ( | ExportDataInterface $ | data | ) |
Set the export data object
| ExportDataInterface | $data |
Implements ExporterInterface.
| setFilename | ( | $ | filename | ) |
Getter/Setter for the filename
| string | $filename Extension (if present in $filename) will be corrected based on the object |
Implements ExporterInterface.
| setTitle | ( | $ | title | ) |
Set a title for the exported document
Implements ExporterInterface.
Reimplemented in XLSXExporter.
| $dependencies = TRUE |
You may check this public variable to see if any dependencies for this class are missing. If this is false it means a dependency is missing and the exporter cannot function properly. The way to do this is to instantiate the class and then immediately check this variable, before calling any other methods.
$export_data [protected] |
$extension [protected] |
Reimplemented in CSVExporter, FlatTextExporter, HTMLExporter, JSONExporter, MarkdownExporter, TabTextExporter, TextListExporter, XLSXExporter, XMLExporter, and YAMLExporter.
$filename [protected] |
$header = array() [protected] |
$output [protected] |
$title [protected] |
1.6.1