Index
-
\com\setasign\Konquadrat
-
Import
-
RowImport
- AbstractRowImport
- AbstractRowImportWithImportRelations
- HasImportRelationsInterface
- ImportRelationFields
- ImportRelationFieldsInterface
- ImportRelations
- ImportRelationsInterface
- ImportRow
- MainImportRow
- MainImportRowFactory
- MainImportRowFactoryInterface
- RowImportHandler
- RowImportHandlerFactory
- RowImportHandlerFactoryInterface
- RowImportHandlerInterface
- RowImportInterface
-
RowImport
-
Import
com\setasign\Konquadrat\Import\RowImport
ImportRelations Interface ImportRelationsInterface
File: /Konquadrat/src/Import/RowImport/ImportRelations.php
Class hierarchy
Implements
Summary
Properties
$importTask
private ImportRelations::$importTask
$mainImportRowFactory
private ImportRelations::$mainImportRowFactory
$objectFinder
private ImportRelations::$objectFinder
Methods
__construct()
public ImportRelations::__construct (
\com\setasign\Konquadrat\Object\ObjectFinder $objectFinder,
MainImportRowFactoryInterface $mainImportRowFactory,
\com\setasign\Konquadrat\Object\Custom\ImportTaskObject $importTask
)MainImportRowFactoryInterface $mainImportRowFactory,
\com\setasign\Konquadrat\Object\Custom\ImportTaskObject $importTask
Parameters
- $objectFinder : \com\setasign\Konquadrat\Object\ObjectFinder
- $mainImportRowFactory : MainImportRowFactoryInterface
- $importTask : \com\setasign\Konquadrat\Object\Custom\ImportTaskObject
compareFields()
Parameters
- $importRow : MainImportRow
- $importRelationFields : ImportRelationFieldsInterface
- $compareFields : array
findAndFetchCompareFields()
private ImportRelations::findAndFetchCompareFields (
int $mainRowId,
string $ident,
array &$rowIds,
callable $fetchIdentAndFieldsOfRow
): ?arraystring $ident,
array &$rowIds,
callable $fetchIdentAndFieldsOfRow
Search for rows with the same ident. This method will check whether the ident is still correct for the given rowIds.
Parameters
- $mainRowId : int
- $ident : string
- $rowIds : array
- $fetchIdentAndFieldsOfRow : callable
Exceptions
Throws \com\setasign\Konquadrat\Exception If no matching row was found
getObject()
Parameters
- $ident : string
Exceptions
Throws \BadMethodCallException If the object doesn't exist, no object is defined or the ident is unknown. Should never be thrown after hasObject($ident) === true.
registerAndCompare()
public ImportRelations::registerAndCompare (
MainImportRow $importRow,
callable $fetchIdentAndFieldsOfRow,
callable $findObjectByIdent,
callable $fetchFieldsOfObject
): voidcallable $fetchIdentAndFieldsOfRow,
callable $findObjectByIdent,
callable $fetchFieldsOfObject
Parameters
- $importRow : MainImportRow
- $fetchIdentAndFieldsOfRow : callable
function (MainImportRow $importRow): ImportRelationFieldsInterface[]
- $findObjectByIdent : callable
function (string $ident): ?AbstractObject
- $fetchFieldsOfObject : callable
function (AbstractObject $object): string[]
registerAndForbidDuplications()
Parameters
- $importRow : MainImportRow
- $fetchIdentAndFieldsOfRow : callable
function (MainImportRow $importRow): ImportRelationFieldsInterface
- $findObjectByIdent : callable
function (string $ident): ?AbstractObject
registerObject()
Parameters
- $ident : string
- $object : \com\setasign\Konquadrat\Object\AbstractObject
searchForMatchingRowOrObject()
private ImportRelations::searchForMatchingRowOrObject (
MainImportRow $importRow,
ImportRelationFieldsInterface $importField,
callable $fetchIdentAndFieldsOfRow,
callable $findObjectByIdent
): \com\setasign\Konquadrat\Object\AbstractObject|array|nullImportRelationFieldsInterface $importField,
callable $fetchIdentAndFieldsOfRow,
callable $findObjectByIdent
Parameters
- $importRow : MainImportRow
- $importField : ImportRelationFieldsInterface
- $fetchIdentAndFieldsOfRow : callable
- $findObjectByIdent : callable
