PHP Класс SimpleExcel\Parser\BaseParser

Автор: Faisalman
Наследование: implements SimpleExcel\Parser\IParser
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$file_extension string Defines valid file extension
$table_arr array Holds the parsed result

Открытые методы

Метод Описание
__construct ( string $file_url = NULL )
getCell ( integer $row_num, integer $col_num, integer $val_only = true ) : array Get value of the specified cell
getColumn ( integer $col_num, boolean $val_only = TRUE ) : array Get data of the specified column as an array
getField ( boolean $val_only = TRUE ) : array Get data of all cells as an array
getRow ( integer $row_num, boolean $val_only = TRUE ) : array Get data of the specified row as an array
isCellExists ( integer $row_num, integer $col_num ) : boolean Check whether cell with specified row & column exists
isColumnExists ( integer $col_num ) : boolean Check whether a specified column exists
isFieldExists ( ) : boolean Check whether table exists
isFileReady ( string $file_path ) : boolean Check whether file exists, valid, and readable
isRowExists ( integer $row_num ) : boolean Check whether a specified row exists

Описание методов

__construct() публичный Метод

public __construct ( string $file_url = NULL )
$file_url string Path to file (optional)

getCell() публичный Метод

Get value of the specified cell
public getCell ( integer $row_num, integer $col_num, integer $val_only = true ) : array
$row_num integer Row number
$col_num integer Column number
$val_only integer
Результат array

getColumn() публичный Метод

Get data of the specified column as an array
public getColumn ( integer $col_num, boolean $val_only = TRUE ) : array
$col_num integer Column number
$val_only boolean
Результат array

getField() публичный Метод

Get data of all cells as an array
public getField ( boolean $val_only = TRUE ) : array
$val_only boolean
Результат array

getRow() публичный Метод

Get data of the specified row as an array
public getRow ( integer $row_num, boolean $val_only = TRUE ) : array
$row_num integer Row number
$val_only boolean
Результат array

isCellExists() публичный Метод

Check whether cell with specified row & column exists
public isCellExists ( integer $row_num, integer $col_num ) : boolean
$row_num integer Row number
$col_num integer Column number
Результат boolean

isColumnExists() публичный Метод

Check whether a specified column exists
public isColumnExists ( integer $col_num ) : boolean
$col_num integer Column number
Результат boolean

isFieldExists() публичный Метод

Check whether table exists
public isFieldExists ( ) : boolean
Результат boolean

isFileReady() публичный Метод

Check whether file exists, valid, and readable
public isFileReady ( string $file_path ) : boolean
$file_path string Path to file
Результат boolean

isRowExists() публичный Метод

Check whether a specified row exists
public isRowExists ( integer $row_num ) : boolean
$row_num integer Row number
Результат boolean

Описание свойств

$file_extension защищенное свойство

Defines valid file extension
protected string $file_extension
Результат string

$table_arr защищенное свойство

Holds the parsed result
protected array $table_arr
Результат array