modules/Import/sources/ImportDataSource.php
\ImportDataSource
- Parent(s)
- ?\Iterator
- Children
- \ExternalSourceEAPMAdapter
- \ImportFile
Properties

$_currentRow= 'FALSE'
Array of the values in the current array we are in
FALSEDetails- Type
- n/a

$_dataSet= 'array()'
Stores a subset or entire portion of the data set requested.
array()Details- Type
- n/a

$_localeSettings= 'array()'
Holds any locale settings needed for import. These can be provided by the user or explicitly set by the user.
array()Details- Type
- n/a

$_rowCountedForErrors= 'false'
True if the current row has already had an error it in, so we don't increase the $_errorCount
falseDetails- Type
- n/a
Methods

formatErrorMessage(
$error, $fieldName, $fieldValue
)
:
void| Name | Type | Description |
|---|---|---|
| $error | ||
| $fieldName | ||
| $fieldValue |

getTotalRecordCount(
)
:
intReturn the total count of records that will be imported.
| Type | Description |
|---|---|
| int |
- Abstract

loadDataSet(
int $maxResults
=
0
)
:
voidReturn 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.
| Name | Type | Description |
|---|---|---|
| $maxResults | int |
- Abstract

markRowAsDuplicate(
$field_names
=
array()
)
:
voidWrites the row out to the ImportCacheFiles::getDuplicateFileName() file
| Name | Type | Description |
|---|---|---|
| $field_names |

markRowAsImported(
\$createdRecord $createdRecord
=
true
)
:
voidMarks whether this row created a new record or not
| Name | Type | Description |
|---|---|---|
| $createdRecord | \$createdRecord | bool true if record is created, false if it is just updated |

setSourceName(
$sourceName
=
''
)
:
voidSet the source name.
| Name | Type | Description |
|---|---|---|
| $sourceName |

writeError(
\$error $error, \$fieldName $fieldName, \$fieldValue $fieldValue
)
:
voidWrites the row out to the ImportCacheFiles::getErrorFileName() file
| Name | Type | Description |
|---|---|---|
| $error | \$error | string |
| $fieldName | \$fieldName | string |
| $fieldValue | \$fieldValue | mixed |

writeErrorRecord(
$errorMessage
=
''
)
:
voidWrites the row out to the ImportCacheFiles::getErrorRecordsFileName() file
| Name | Type | Description |
|---|---|---|
| $errorMessage |

writeRowToLastImport(
string $import_module, string $module, string $id
)
:
voidAdd this row to the UsersLastImport table
| 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 |