Definition at line 53 of file SimpleExcel.php.
◆ __construct()
SimpleExcel\SimpleExcel::__construct |
( |
|
$filetype = 'XML' | ) |
|
SimpleExcel constructor method.
- Parameters
-
string | $filetype | Set the filetype of the file which will be parsed (XML/CSV/TSV/HTML/JSON) |
- Returns
- void
Definition at line 80 of file SimpleExcel.php.
constructWriter($filetype)
Construct a SimpleExcel Writer.
constructParser($filetype)
Construct a SimpleExcel Parser.
◆ constructParser()
SimpleExcel\SimpleExcel::constructParser |
( |
|
$filetype | ) |
|
Construct a SimpleExcel Parser.
- Parameters
-
string | $filetype | Set the filetype of the file which will be parsed (XML/CSV/TSV/HTML/JSON) |
- Exceptions
-
Exception | If filetype is neither XML/CSV/TSV/HTML/JSON |
Definition at line 91 of file SimpleExcel.php.
References SimpleExcel\Exception\SimpleExcelException\FILETYPE_NOT_SUPPORTED.
92 $filetype = strtoupper($filetype);
93 if(!in_array($filetype, $this->validParserTypes)){
96 $parser_class =
'SimpleExcel\\Parser\\'.$filetype.
'Parser';
97 $this->parser =
new $parser_class();
const FILETYPE_NOT_SUPPORTED
◆ constructWriter()
SimpleExcel\SimpleExcel::constructWriter |
( |
|
$filetype | ) |
|
Construct a SimpleExcel Writer.
- Parameters
-
string | $filetype | Set the filetype of the file which will be written (XML/CSV/TSV/HTML/JSON) |
- Returns
- bool
- Exceptions
-
Exception | If filetype is neither XML/CSV/TSV/HTML/JSON |
Definition at line 107 of file SimpleExcel.php.
References SimpleExcel\Exception\SimpleExcelException\FILETYPE_NOT_SUPPORTED.
108 $filetype = strtoupper($filetype);
110 if(!in_array($filetype, $this->validWriterTypes)){
113 $writer_class =
'SimpleExcel\\Writer\\'.$filetype.
'Writer';
114 $this->writer =
new $writer_class();
const FILETYPE_NOT_SUPPORTED
◆ convertTo()
SimpleExcel\SimpleExcel::convertTo |
( |
|
$filetype | ) |
|
Change writer type to convert to another format.
- Parameters
-
string | $filetype | Set the filetype of the file which will be written (XML/CSV/TSV/HTML/JSON) |
Definition at line 122 of file SimpleExcel.php.
124 $this->writer->setData($this->parser->getField());
constructWriter($filetype)
Construct a SimpleExcel Writer.
◆ $parser
SimpleExcel\SimpleExcel::$parser |
◆ $validParserTypes
SimpleExcel\SimpleExcel::$validParserTypes = array('XML', 'CSV', 'TSV', 'HTML', 'JSON') |
|
protected |
◆ $validWriterTypes
SimpleExcel\SimpleExcel::$validWriterTypes = array('XML', 'CSV', 'TSV', 'HTML', 'JSON') |
|
protected |
◆ $writer
SimpleExcel\SimpleExcel::$writer |
The documentation for this class was generated from the following file: