PHP Class Tdt\Core\DataControllers\CSVController

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 )
parseColumns ( $config ) Parse the columns from a CSV file and return them Optionally aliases can be given to columns as well as a primary key
readData ( $source_definition, $rest_parameters = [] )

Private Methods

Method Description
createValues ( $columns, $data ) This function returns an array with key=column-name and value=data.
processURI ( string $uri ) : array Parse the URI and look for the resource name and the format

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

parseColumns() public static method

Parse the columns from a CSV file and return them Optionally aliases can be given to columns as well as a primary key
public static parseColumns ( $config )

readData() public method

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