src/xPDO/Transport/xPDOObjectVehicle.php
public function _installRelated(& $transport, & $parent, $element, $options, $owner = '') {
        $installed = true;
        if ($parent instanceof xPDOObject && isset ($element[xPDOTransport::RELATED_OBJECTS]) && is_array($element[xPDOTransport::RELATED_OBJECTS])) {
            foreach ($element[xPDOTransport::RELATED_OBJECTS] as $rAlias => $rVehicles) {
                $rMeta = $parent->getFKDefinition($rAlias);
                if ($rMeta) {
                    if (!empty($owner) && $owner !== $rMeta['owner']) continue;
                    $rOptions = $options;
                    if (isset($element[xPDOTransport::RELATED_OBJECT_ATTRIBUTES])) {
                        if (isset($element[xPDOTransport::RELATED_OBJECT_ATTRIBUTES][$rAlias])) {
                            $rOptions = array_merge($rOptions, $element[xPDOTransport::RELATED_OBJECT_ATTRIBUTES][$rAlias]);
                        } elseif (isset($element[xPDOTransport::RELATED_OBJECT_ATTRIBUTES][$rMeta['class']])) {
                            $rOptions = array_merge($rOptions, $element[xPDOTransport::RELATED_OBJECT_ATTRIBUTES][$rMeta['class']]);
                        }
                    }
                    foreach ($rVehicles as $rKey => $rVehicle) {
                        $installed = $this->_installObject($transport, $rOptions, $rVehicle, $parent, $rMeta);
                    }
                }
            }
        }
        return $installed;
    }
public function _installRelated(& $transport, & $parent, $element, $options, $owner = '') {
        $installed = true;
        if ($parent instanceof xPDOObject && isset ($element[xPDOTransport::RELATED_OBJECTS]) && is_array($element[xPDOTransport::RELATED_OBJECTS])) {
            foreach ($element[xPDOTransport::RELATED_OBJECTS] as $rAlias => $rVehicles) {
                $rMeta = $parent->getFKDefinition($rAlias);
                if ($rMeta) {
                    if (!empty($owner) && $owner !== $rMeta['owner']) continue;
                    $rOptions = $options;
                    if (isset($element[xPDOTransport::RELATED_OBJECT_ATTRIBUTES])) {
                        if (isset($element[xPDOTransport::RELATED_OBJECT_ATTRIBUTES][$rAlias])) {
                            $rOptions = array_merge($rOptions, $element[xPDOTransport::RELATED_OBJECT_ATTRIBUTES][$rAlias]);
                        } elseif (isset($element[xPDOTransport::RELATED_OBJECT_ATTRIBUTES][$rMeta['class']])) {
                            $rOptions = array_merge($rOptions, $element[xPDOTransport::RELATED_OBJECT_ATTRIBUTES][$rMeta['class']]);
                        }
                    }
                    foreach ($rVehicles as $rKey => $rVehicle) {
                        $installed = $this->_installObject($transport, $rOptions, $rVehicle, $parent, $rMeta);
                    }
                }
            }
        }
        return $installed;
    }
public function _installRelated ( & $ transport , & $ parent , $ element , $ options , $ owner = '' ) { $ installed = true ; if ( $ parent instanceof xPDOObject && isset ( $ element [ xPDOTransport :: RELATED_OBJECTS ] ) && is_array ( $ element [ xPDOTransport :: RELATED_OBJECTS ] ) ) { foreach ( $ element [ xPDOTransport :: RELATED_OBJECTS ] as $ rAlias => $ rVehicles ) { $ rMeta = $ parent -> getFKDefinition ( $ rAlias ) ; if ( $ rMeta ) { if ( ! empty ( $ owner ) && $ owner !== $ rMeta [ 'owner' ] ) continue ; $ rOptions = $ options ; if ( isset ( $ element [ xPDOTransport :: RELATED_OBJECT_ATTRIBUTES ] ) ) { if ( isset ( $ element [ xPDOTransport :: RELATED_OBJECT_ATTRIBUTES ] [ $ rAlias ] ) ) { $ rOptions = array_merge ( $ rOptions , $ element [ xPDOTransport :: RELATED_OBJECT_ATTRIBUTES ] [ $ rAlias ] ) ; } elseif ( isset ( $ element [ xPDOTransport :: RELATED_OBJECT_ATTRIBUTES ] [ $ rMeta [ 'class' ] ] ) ) { $ rOptions = array_merge ( $ rOptions , $ element [ xPDOTransport :: RELATED_OBJECT_ATTRIBUTES ] [ $ rMeta [ 'class' ] ] ) ; } } foreach ( $ rVehicles as $ rKey => $ rVehicle ) { $ installed = $ this -> _installObject ( $ transport , $ rOptions , $ rVehicle , $ parent , $ rMeta ) ; } } } } return $ installed ; }
Installs a related object from the vehicle.

@param xPDOTransport &$transport
@param xPDOObject &$parent
@param array $element
@param array $options
@param string $owner

@return bool
Installs a related object from the vehicle .