Import adapter for CSV documents

package Webenq_Data_Import
author Bart Huttinga

 Methods

Decodes the given string

UTF8Decode(\encoded $value) : \decoded
Inherited
inherited_from \Webenq_Import_Adapter_Abstract::UTF8Decode()

Parameters

$value

\encoded

string

Returns

\decodedstring

Opens the file for reading

__construct(string $filename) : \Webenq_Import_Adapter_Csv
fluent This method is part of a fluent interface and will return the same instance

Parameters

$filename

string

Returns

Factory for an import-adapter

factory(string $filename) 
InheritedStatic
inherited_from \Webenq_Import_Adapter_Abstract::factory()

Parameters

$filename

string

Name of the file

Returns the value for the given cell

getCell() : string
Inherited

The first parameter can be in the form of 'A1'. In that case the second paramter can be an integer indicating the working-sheet to use (defaults to 0). Alternatively the first and second parameter together can represent the cell, in the form 0, 0 (equals to A1). In that case the working-sheet integer is the third parameter.

inherited_from \Webenq_Import_Adapter_Abstract::getCell()

Returns

stringThe value of the requested cell

Gets the data from the file

getData() : array

Returns

arrayNested array of sheets containing questions and answers

Returns the filename of the uploaded file

getFilename() : string
Inherited
inherited_from \Webenq_Import_Adapter_Abstract::getFilename()

Returns

stringFilename

Helper function for getCell()

_getCellFromArray(string $row, string $col, int $sheet) : string
Inherited
inherited_from \Webenq_Import_Adapter_Abstract::_getCellFromArray()

Parameters

$row

string

$col

string

$sheet

int

Returns

stringThe value of the requested cell

Helper function for getCell()

_getCellFromMatrix(string $cell, int $sheet) : string
Inherited
inherited_from \Webenq_Import_Adapter_Abstract::_getCellFromMatrix()

Parameters

$cell

string

$sheet

int

Returns

stringThe value of the requested cell

Translates some field labels to Dutch

_translate(string $value) : string
Inherited
inherited_from \Webenq_Import_Adapter_Abstract::_translate()

Parameters

$value

string

Non-Dutch field label

Returns

stringDutch field label

 Properties

 

$supportedFormats : array
Inherited

For every entry in this array there must be an adapter class.

inherited_from \Webenq_Import_Adapter_Abstract::$$supportedFormats
 

$_data : array
 

$_fh 
 

$_filename