PHP Class Tdt\Core\DataControllers\XLSController

Author: Jan Vansteenlandt ([email protected])
Author: Pieter Colpaert ([email protected])
Author: Michiel Vancoillie ([email protected])
Inheritance: extends Tdt\Core\DataControllers\ADataController
Show file Open project: tdt/core Class Usage Examples

Public Methods

Method Description
__construct ( Tdt\Core\Repositories\Interfaces\TabularColumnsRepositoryInterface $tabular_columns, Tdt\Core\Repositories\Interfaces\GeoPropertyRepositoryInterface $geo_properties )
getFileExtension ( $file ) Retrieve the file extension from the xls file. (xls or xlsx)
loadExcel ( $file, $type, $sheet ) Create an Excel PHP Reader object from the Excel sheet.
parseColumns ( $input ) Retrieve colummn information from the request parameters.
readData ( $source_definition, $rest_parameters = [] )

Private Methods

Method Description
createValues ( $columns, $data ) This function returns an array with key=column-name and value=data given a certain data row.

Method Details

__construct() public method

public __construct ( Tdt\Core\Repositories\Interfaces\TabularColumnsRepositoryInterface $tabular_columns, Tdt\Core\Repositories\Interfaces\GeoPropertyRepositoryInterface $geo_properties )
$tabular_columns Tdt\Core\Repositories\Interfaces\TabularColumnsRepositoryInterface
$geo_properties Tdt\Core\Repositories\Interfaces\GeoPropertyRepositoryInterface

getFileExtension() public static method

Retrieve the file extension from the xls file. (xls or xlsx)
public static getFileExtension ( $file )

loadExcel() public static method

Create an Excel PHP Reader object from the Excel sheet.
public static loadExcel ( $file, $type, $sheet )

parseColumns() public static method

Retrieve colummn information from the request parameters.
public static parseColumns ( $input )

readData() public method

public readData ( $source_definition, $rest_parameters = [] )