Package DE_EPAGES::Core::API::CSV::BaseExportDriver
Base class for csv export drivers
Functions
- columns
- drive
- encodeTo
- exportCSV
- exportLine
- fileHandle
- fileName
- incLineNumber
- items
- lineNumber
- new
- parse
- popID
- pushID
- topID
- writeHeader
- writeLine
- writeLines
- writer
columns
return the column name array
Syntax |
$aColumns = $self->columns; |
Return |
|
drive
write the data content lines
Syntax |
$self->drive(); |
encodeTo
returns the target encoding (was setted in exportCSV)
Syntax |
encodeTo(); |
Example |
$Driver->encodeTo(); |
Return |
|
exportCSV
exports data (2 dim. array) into a file. starts the document, calls function parse and closes the document
Syntax |
$Exporter->exportCSV($FileName, $hFormat, $aColumns, $aaData ); |
Input |
|
exportLine
exports one data line, get the line element from function topID('Item')
Syntax |
$self->exportLine(); |
fileHandle
return the current fileHandle
Syntax |
$self->fileHandle; |
Return |
|
fileName
return the current fileName
Syntax |
$self->fileName; |
Return |
|
incLineNumber
return the incremented linenumber
Syntax |
$linenumber = $self->incLineNumber; |
Return |
|
items
return the items to export
Syntax |
my $Items = $self->items(); |
Return |
|
lineNumber
return the current linenumber
Syntax |
$linenumber = $self->lineNumber; |
Return |
|
new
create a new csv export driver
Syntax |
$Exporter = DE_EPAGES::Core::API::CSV::BaseExportDriver->new(%options); |
Input |
|
Return |
|
parse
calls function writeHeader, calls function drive
Syntax |
$self->parse(); |
popID
removes a parameter from the parameter stack and returns its value.
Syntax |
$Value = $self->popID( $Key ); |
Example |
$CompanyID = $self->popID( 'CompanyID' ); |
Input |
|
Return |
|
pushID
adds a parameter to the parameter stack. Any previous parameter with the same name will be hidden until $self->popID( $Key ) is called. Use $self->topID( $Key ) to get the parameter value. Use $self->popID( $Key ) to remove the parameter from the stack.
Syntax |
$self->pushID( $Key, $Value ); |
Example |
$self->pushID( 'CompanyID', $CompanyID ); |
Input |
|
topID
returns the current value of a parameter
Syntax |
$Value = $self->topID( $Key ); |
Example |
$CompanyID = $self->topID( 'CompanyID' ); |
Input |
|
Return |
|
writeHeader
writes the header
Syntax |
$self->writeHeader(); |
writeLine
exports a line ( converts and writes to the filehandle )
Syntax |
$self->writeLine($aLineElements); |
writeLines
writes the content lines each item of $self->items would exported via function exportLine
Syntax |
$self->writeLines(); |
writer
return the current csv writer
Syntax |
$Writer = $self->writer; |
Return |
|