Common parts for import adapters

package Webenq_Data_Import
author Bart Huttinga

 Methods

Decodes the given string

UTF8Decode(\encoded $value) : \decoded

Parameters

$value

\encoded

string

Returns

\decodedstring

Factory for an import-adapter

factory(string $filename) 
Static

Parameters

$filename

string

Name of the file

Returns the value for the given cell

getCell() : string

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.

Returns

stringThe value of the requested cell

Gets all data from the file

getData() : array
Inherited
inherited_from \Webenq_Import_Adapter_Interface::getData()

Returns

array

Returns the filename of the uploaded file

getFilename() : string

Returns

stringFilename

Helper function for getCell()

_getCellFromArray(string $row, string $col, int $sheet) : string

Parameters

$row

string

$col

string

$sheet

int

Returns

stringThe value of the requested cell

Helper function for getCell()

_getCellFromMatrix(string $cell, int $sheet) : string

Parameters

$cell

string

$sheet

int

Returns

stringThe value of the requested cell

Translates some field labels to Dutch

_translate(string $value) : string

Parameters

$value

string

Non-Dutch field label

Returns

stringDutch field label

 Properties

 

$supportedFormats : array

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