com\setasign\Konquadrat\Import\RowImport

ImportRelations Interface ImportRelationsInterface

File: /Konquadrat/src/Import/RowImport/ImportRelations.php

Class hierarchy

Implements

Summary

Properties

$importTask

$mainImportRowFactory

$objectFinder


Methods

compareFields()

private ImportRelations::compareFields (
MainImportRow $importRow,
ImportRelationFieldsInterface $importRelationFields,
array $compareFields
): void
Parameters
$importRow : MainImportRow
 
$importRelationFields : ImportRelationFieldsInterface
 
$compareFields : array
 

deleteRows()

public ImportRelations::deleteRows (
int[] $rowIds
): void
Parameters
$rowIds : int[]
 

findAndFetchCompareFields()

private ImportRelations::findAndFetchCompareFields (
int $mainRowId,
string $ident,
array &$rowIds,
callable $fetchIdentAndFieldsOfRow
): ?array

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.

hasObject()

public ImportRelations::hasObject (
string $ident
): bool
Parameters
$ident : string
 

registerAndCompare()

public ImportRelations::registerAndCompare (
MainImportRow $importRow,
callable $fetchIdentAndFieldsOfRow,
callable $findObjectByIdent,
callable $fetchFieldsOfObject
): void
Parameters
$importRow : MainImportRow
 
$fetchIdentAndFieldsOfRow : callable

function (MainImportRow $importRow): ImportRelationFieldsInterface[]

$findObjectByIdent : callable

function (string $ident): ?AbstractObject

$fetchFieldsOfObject : callable

function (AbstractObject $object): string[]

registerAndForbidDuplications()

public ImportRelations::registerAndForbidDuplications (
MainImportRow $importRow,
callable $fetchIdentAndFieldsOfRow,
callable $findObjectByIdent
): void
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|null
Parameters
$importRow : MainImportRow
 
$importField : ImportRelationFieldsInterface
 
$fetchIdentAndFieldsOfRow : callable
 
$findObjectByIdent : callable