modules/Import/sources/ImportDataSource.php

Show: inherited
Table of Contents

\ImportDataSource

Package:
Parent(s)
?\Iterator
Children
\ExternalSourceEAPMAdapter
\ImportFile

Properties

Propertyprivate  $_createdCount= '0'

Count of newly created rows

Default value0Details
Type
n/a
Propertyprotected  $_currentRow= 'FALSE'

Array of the values in the current array we are in

Default valueFALSEDetails
Type
n/a
Propertyprotected  $_dataSet= 'array()'

Stores a subset or entire portion of the data set requested.

Default valuearray()Details
Type
n/a
Propertyprivate  $_dupeCount= '0'

Count of duplicate rows

Default value0Details
Type
n/a
Propertyprivate  $_errorCount= '0'

Count of rows with errors

Default value0Details
Type
n/a
Propertyprotected  $_localeSettings= 'array()'

Holds any locale settings needed for import. These can be provided by the user or explicitly set by the user.

Default valuearray()Details
Type
n/a
Propertyprotected  $_offset= '0'

The current offset the data set should start at

Default value0Details
Type
n/a
Propertyprotected  $_rowCountedForErrors= 'false'

True if the current row has already had an error it in, so we don't increase the $_errorCount

Default valuefalseDetails
Type
n/a
Propertyprotected  $_rowsCount= '0'

Count of rows processed

Default value0Details
Type
n/a
Propertyprotected  $_sourcename= ''

Sourcename used as an identifier for this import

Details
Type
n/a
Propertyprivate  $_updatedCount= '0'

Count of updated rows

Default value0Details
Type
n/a

Methods

methodpublic__get(  $var ) : void

Parameters
Name Type Description
$var
methodprotectedformatErrorMessage(  $error,  $fieldName,  $fieldValue ) : void

Parameters
Name Type Description
$error
$fieldName
$fieldValue
methodpublicgetCurrentOffset( ) : int

Return the current offset

Returns
Type Description
int
methodpublicgetDataSet( ) : array

Return the current data set loaded.

Returns
Type Description
array
methodpublicgetHeaderColumns( ) : void
abstract

Details
Abstract
 
methodpublicgetTotalRecordCount( ) : int
abstract

Return the total count of records that will be imported.

Returns
Type Description
int
Details
Abstract
 
methodpublicloadDataSet( int $maxResults = 0 ) : void
abstract

Return a result set from the external source as an associative array with the key value equal to the external field name and the rvalue equal to the actual value.

Parameters
Name Type Description
$maxResults int
Details
Abstract
 
methodpublicmarkRowAsDuplicate(  $field_names = array() ) : void

Writes the row out to the ImportCacheFiles::getDuplicateFileName() file

Parameters
Name Type Description
$field_names
methodpublicmarkRowAsImported( \$createdRecord $createdRecord = true ) : void

Marks whether this row created a new record or not

Parameters
Name Type Description
$createdRecord \$createdRecord

bool true if record is created, false if it is just updated

methodpublicresetRowErrorCounter( ) : void

methodpublicsetCurrentOffset(  $offset ) : void

Set the current offset.

Parameters
Name Type Description
$offset
methodpublicsetSourceName(  $sourceName = '' ) : void

Set the source name.

Parameters
Name Type Description
$sourceName
methodpublicwriteError( \$error $error, \$fieldName $fieldName, \$fieldValue $fieldValue ) : void

Writes the row out to the ImportCacheFiles::getErrorFileName() file

Parameters
Name Type Description
$error \$error

string

$fieldName \$fieldName

string

$fieldValue \$fieldValue

mixed

methodpublicwriteErrorRecord(  $errorMessage = '' ) : void

Writes the row out to the ImportCacheFiles::getErrorRecordsFileName() file

Parameters
Name Type Description
$errorMessage
methodpublicwriteRowToLastImport( string $import_module, string $module, string $id ) : void
static

Add this row to the UsersLastImport table

Parameters
Name Type Description
$import_module string

name of the module we are doing the import into

$module string

name of the bean we are creating for this import

$id string

id of the recorded created in the $module

methodpublicwriteStatus( ) : void

Writes the totals and filename out to the ImportCacheFiles::getStatusFileName() file

Documentation was generated by DocBlox 0.18.1.