class FrxWordDoc in Forena Reports 7.4
Same name and namespace in other branches
- 7.3 docformats/FrxWordDoc.inc \FrxWordDoc
@file FrxWordDoc.inc Word document exporter. @author davidmetzler
Hierarchy
- class \FrxDocument
- class \FrxWordDoc
Expanded class hierarchy of FrxWordDoc
1 string reference to 'FrxWordDoc'
- forena_forena_document_types in ./
forena.module - Self register document formats with Forena
File
- docformats/
FrxWordDoc.inc, line 8 - FrxWordDoc.inc Word document exporter. @author davidmetzler
View source
class FrxWordDoc extends FrxDocument {
public function __construct() {
$this->content_type = 'application/msword';
}
public function render($r, $format, $options = array()) {
$css = $this
->loadCSSFiles($format);
$output = '<html><head>';
$output .= '<meta http-equiv="Content-Type" content="text/html"/>';
if (isset($r->rpt_xml->head->style)) {
$output .= '<style type="text/css">';
$output .= $css;
if (isset($r->rpt_xml->head->style)) {
$sheet = (string) $r->rpt_xml->head->style;
$output .= $sheet;
}
$output .= '</style>';
}
$output .= '<title>' . $r->title . '</title></head><body class="forena-report">' . $r->html . '</body></html>';
return $output;
}
public function output(&$output) {
$output = $this
->convertCharset($output, 'windows-1252');
parent::output($output);
return TRUE;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FrxDocument:: |
public | property | ||
FrxDocument:: |
public | property | ||
FrxDocument:: |
public | property | ||
FrxDocument:: |
public | property | ||
FrxDocument:: |
public | property | ||
FrxDocument:: |
public | function | Wrapper function for check output to default the right type. | |
FrxDocument:: |
public | function | ||
FrxDocument:: |
public | function | 5 | |
FrxDocument:: |
public | function | ||
FrxWordDoc:: |
public | function |
Overrides FrxDocument:: |
|
FrxWordDoc:: |
public | function |
Overrides FrxDocument:: |
|
FrxWordDoc:: |
public | function |