ILIAS
release_4-4 Revision
|
Public Member Functions | |
getCell ($row_num, $col_num, $val_only=true) | |
Get value of the specified cell. More... | |
getColumn ($col_num, $val_only=TRUE) | |
Get data of the specified column as an array. More... | |
getField ($val_only=TRUE) | |
Get data of all cells as an array. More... | |
getRow ($row_num, $val_only=TRUE) | |
Get data of the specified row as an array. More... | |
isColumnExists ($col_num) | |
Check whether a specified column exists. More... | |
isRowExists ($row_num) | |
Check whether a specified row exists. More... | |
loadFile ($file_path) | |
Load the XML file to be parsed. More... | |
loadString ($str) | |
Load the string to be parsed. More... | |
![]() | |
__construct ($file_url=NULL) | |
getCell ($row_num, $col_num, $val_only=true) | |
Get value of the specified cell. More... | |
getColumn ($col_num, $val_only=TRUE) | |
Get data of the specified column as an array. More... | |
getField ($val_only=TRUE) | |
Get data of all cells as an array. More... | |
getRow ($row_num, $val_only=TRUE) | |
Get data of the specified row as an array. More... | |
isCellExists ($row_num, $col_num) | |
Check whether cell with specified row & column exists. More... | |
isColumnExists ($col_num) | |
Check whether a specified column exists. More... | |
isRowExists ($row_num) | |
Check whether a specified row exists. More... | |
isFieldExists () | |
Check whether table exists. More... | |
isFileReady ($file_path) | |
Check whether file exists, valid, and readable. More... | |
Protected Attributes | |
$file_extension = 'xml' | |
![]() | |
$table_arr | |
$file_extension = '' | |
Private Member Functions | |
getAttributes ($attrs_obj) | |
Extract attributes from SimpleXMLElement object. More... | |
parseDOM ($xml) | |
Process the loaded file/string. More... | |
Definition at line 13 of file XMLParser.php.
|
private |
Extract attributes from SimpleXMLElement object.
private
object | $attrs_obj |
Definition at line 30 of file XMLParser.php.
Referenced by SimpleExcel\Parser\XMLParser\parseDOM().
SimpleExcel\Parser\XMLParser::getCell | ( | $row_num, | |
$col_num, | |||
$val_only = true |
|||
) |
Get value of the specified cell.
int | $row_num | Row number |
int | $col_num | Column number |
int | $val_only | Whether returns only it's value or complete data |
Exception | If the cell identified doesn't exist. |
Implements SimpleExcel\Parser\IParser.
Definition at line 51 of file XMLParser.php.
References SimpleExcel\Exception\SimpleExcelException\CELL_NOT_FOUND, and SimpleExcel\Parser\BaseParser\isCellExists().
SimpleExcel\Parser\XMLParser::getColumn | ( | $col_num, | |
$val_only = TRUE |
|||
) |
Get data of the specified column as an array.
int | $col_num | Column number |
bool | $val_only | Returns (value only | complete data) for every cell, default to TRUE |
Exception | If the column requested doesn't exist. |
Implements SimpleExcel\Parser\IParser.
Definition at line 77 of file XMLParser.php.
References $row, SimpleExcel\Exception\SimpleExcelException\COLUMN_NOT_FOUND, and SimpleExcel\Parser\XMLParser\isColumnExists().
SimpleExcel\Parser\XMLParser::getField | ( | $val_only = TRUE | ) |
Get data of all cells as an array.
bool | $val_only | Returns (value only | complete data) for every cell, default to TRUE |
Exception | If the field is not set. |
Implements SimpleExcel\Parser\IParser.
Definition at line 108 of file XMLParser.php.
References $row, SimpleExcel\Parser\BaseParser\$table_arr, SimpleExcel\Exception\SimpleExcelException\FIELD_NOT_FOUND, and SimpleExcel\Parser\BaseParser\isFieldExists().
SimpleExcel\Parser\XMLParser::getRow | ( | $row_num, | |
$val_only = TRUE |
|||
) |
Get data of the specified row as an array.
int | $row_num | Row number |
bool | $val_only | Returns (value only | complete data) for every cell, default to TRUE |
Exception | When a row is requested that doesn't exist. |
Implements SimpleExcel\Parser\IParser.
Definition at line 137 of file XMLParser.php.
References $row, SimpleExcel\Parser\XMLParser\isRowExists(), and SimpleExcel\Exception\SimpleExcelException\ROW_NOT_FOUND.
SimpleExcel\Parser\XMLParser::isColumnExists | ( | $col_num | ) |
Check whether a specified column exists.
int | $col_num | Column number |
Implements SimpleExcel\Parser\IParser.
Definition at line 163 of file XMLParser.php.
References $row.
Referenced by SimpleExcel\Parser\XMLParser\getColumn().
SimpleExcel\Parser\XMLParser::isRowExists | ( | $row_num | ) |
Check whether a specified row exists.
int | $row_num | Row number |
Implements SimpleExcel\Parser\IParser.
Definition at line 181 of file XMLParser.php.
Referenced by SimpleExcel\Parser\XMLParser\getRow().
SimpleExcel\Parser\XMLParser::loadFile | ( | $file_path | ) |
Load the XML file to be parsed.
string | $file_path | Path to XML file |
Implements SimpleExcel\Parser\IParser.
Definition at line 303 of file XMLParser.php.
References SimpleExcel\Parser\BaseParser\isFileReady(), and SimpleExcel\Parser\XMLParser\parseDOM().
SimpleExcel\Parser\XMLParser::loadString | ( | $str | ) |
Load the string to be parsed.
string | $str | String with XML format |
Implements SimpleExcel\Parser\IParser.
Definition at line 318 of file XMLParser.php.
References SimpleExcel\Parser\XMLParser\parseDOM().
|
private |
Process the loaded file/string.
SimpleXMLElement | $xml | SimpleXMLElement object of XML |
Exception | If document namespace invalid |
Definition at line 192 of file XMLParser.php.
References $row, SimpleExcel\Parser\XMLParser\getAttributes(), and SimpleExcel\Exception\SimpleExcelException\INVALID_DOCUMENT_NAMESPACE.
Referenced by SimpleExcel\Parser\XMLParser\loadFile(), and SimpleExcel\Parser\XMLParser\loadString().
|
protected |
Definition at line 21 of file XMLParser.php.