ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
SimpleExcel\Writer\HTMLWriter Class Reference
+ Inheritance diagram for SimpleExcel\Writer\HTMLWriter:
+ Collaboration diagram for SimpleExcel\Writer\HTMLWriter:

Public Member Functions

 saveString ()
 Get document content as string. More...
 
- Public Member Functions inherited from SimpleExcel\Writer\BaseWriter
 __construct ()
 
 addRow ($values)
 Adding row data to table. More...
 
 saveString ()
 Get document content as string. More...
 
 saveFile ($filename, $target=NULL)
 Export the document. More...
 
 setData ($values)
 Set tabular data. More...
 

Protected Attributes

 $content_type = 'text/html'
 
 $file_extension = 'html'
 
- Protected Attributes inherited from SimpleExcel\Writer\BaseWriter
 $tabl_data
 
 $content_type = 'text'
 
 $file_extension = 'txt'
 

Detailed Description

Definition at line 11 of file HTMLWriter.php.

Member Function Documentation

◆ saveString()

SimpleExcel\Writer\HTMLWriter::saveString ( )

Get document content as string.

Returns
string Content of document

Implements SimpleExcel\Writer\IWriter.

Definition at line 34 of file HTMLWriter.php.

References $row.

34  {
35  $content = '<table>';
36  foreach ($this->tabl_data as $row) {
37  $content .= '<tr>';
38  foreach ($row as $cell) {
39  $content .= '<td>'.$cell.'</td>';
40  }
41  $content .= '</tr>';
42  }
43  return $content.'</table>';
44  }

Field Documentation

◆ $content_type

SimpleExcel\Writer\HTMLWriter::$content_type = 'text/html'
protected

Definition at line 19 of file HTMLWriter.php.

◆ $file_extension

SimpleExcel\Writer\HTMLWriter::$file_extension = 'html'
protected

Definition at line 27 of file HTMLWriter.php.


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