src/FlexiPeeHP/FlexiBeeRW.php
public function assignResultIDs($candidates)
    {
        foreach ($this->chained as $chid => $chained) {
            $chainedEvidence = $chained->getEvidence();
            $chainedExtid    = $chained->getRecordID();
            if (is_array($chainedExtid)) { //if there are more IDs
                foreach ($chainedExtid as $extId) { //find external ID in format ext:.....
                    if (stripos($extId, 'ext:') === 0) {
                        $chainedExtid = $extId;
                        break;
                    }
                }
            }
            $chained->getData();
            if (isset($candidates[$chainedEvidence][$chainedExtid])) {
                $chained->setMyKey($candidates[$chainedEvidence][$chainedExtid]);
                $chained->setDataValue('external-ids', [$chainedExtid]);
            }
            if (count($this->chained[$chid]->chained)) {
                $this->chained[$chid]->assignResultIDs($candidates);
            }
        }
    }
public function assignResultIDs($candidates)
    {
        foreach ($this->chained as $chid => $chained) {
            $chainedEvidence = $chained->getEvidence();
            $chainedExtid    = $chained->getRecordID();
            if (is_array($chainedExtid)) { //if there are more IDs
                foreach ($chainedExtid as $extId) { //find external ID in format ext:.....
                    if (stripos($extId, 'ext:') === 0) {
                        $chainedExtid = $extId;
                        break;
                    }
                }
            }
            $chained->getData();
            if (isset($candidates[$chainedEvidence][$chainedExtid])) {
                $chained->setMyKey($candidates[$chainedEvidence][$chainedExtid]);
                $chained->setDataValue('external-ids', [$chainedExtid]);
            }
            if (count($this->chained[$chid]->chained)) {
                $this->chained[$chid]->assignResultIDs($candidates);
            }
        }
    }
public function assignResultIDs ( $ candidates ) { foreach ( $ this -> chained as $ chid => $ chained ) { $ chainedEvidence = $ chained -> getEvidence ( ) ; $ chainedExtid = $ chained -> getRecordID ( ) ; if ( is_array ( $ chainedExtid ) ) { //if there are more IDs foreach ( $ chainedExtid as $ extId ) { //find external ID in format ext:..... if ( stripos ( $ extId , 'ext:' ) === 0 ) { $ chainedExtid = $ extId ; break ; } } } $ chained -> getData ( ) ; if ( isset ( $ candidates [ $ chainedEvidence ] [ $ chainedExtid ] ) ) { $ chained -> setMyKey ( $ candidates [ $ chainedEvidence ] [ $ chainedExtid ] ) ; $ chained -> setDataValue ( 'external-ids' , [ $ chainedExtid ] ) ; } if ( count ( $ this -> chained [ $ chid ] -> chained ) ) { $ this -> chained [ $ chid ] -> assignResultIDs ( $ candidates ) ; } } }
Assign result IDs to its source objects

@param array $candidates FlexiBee insert IDs  prepared by extractResultIDs()
Assign result IDs to its source objects