src/ShopBundle/mappers/order/TPkgShopMapper_OrderUserData.class.php
protected function getAddress(TdbShopOrder $oOrder, $iAddressType, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled)
    {
        $aAddress = array();

        if (self::ADDRESS_TYPE_BILLING === $iAddressType) {
            $oSalutation = $oOrder->GetFieldAdrBillingSalutation();
            if ($oSalutation && $bCachingEnabled) {
                $oCacheTriggerManager->addTrigger($oSalutation->table, $oSalutation->id);
            }
            $aAddress['sSalutation'] = (null !== $oSalutation) ? ($oSalutation->GetName()) : ('');

            $aAddress['sFirstName'] = $oOrder->fieldAdrBillingFirstname;
            $aAddress['sLastName'] = $oOrder->fieldAdrBillingLastname;
            $aAddress['sAdditionalInfo'] = $oOrder->fieldAdrBillingAdditionalInfo;
            $aAddress['sAddressStreet'] = $oOrder->fieldAdrBillingStreet;
            $aAddress['sAddressStreetNr'] = $oOrder->fieldAdrBillingStreetnr;
            $aAddress['sAddressZip'] = $oOrder->fieldAdrBillingPostalcode;
            $aAddress['sAddressCity'] = $oOrder->fieldAdrBillingCity;
            $aAddress['sAddressTelephone'] = $oOrder->fieldAdrBillingTelefon;
            $aAddress['sAddressFax'] = $oOrder->fieldAdrBillingFax;

            $oCountry = $oOrder->GetFieldAdrBillingCountry();
            if (null !== $oCountry) {
                if ($bCachingEnabled) {
                    $oCacheTriggerManager->addTrigger($oCountry->table, $oCountry->id);
                }
                $aAddress['sAddressCountry'] = (null !== $oCountry) ? ($oCountry->GetName()) : ('');
            }
        } elseif (self::ADDRESS_TYPE_SHIPPING === $iAddressType) {
            $oSalutation = $oOrder->GetFieldAdrShippingSalutation();
            if ($oSalutation && $bCachingEnabled) {
                $oCacheTriggerManager->addTrigger($oSalutation->table, $oSalutation->id);
            }
            $aAddress['sSalutation'] = (null !== $oSalutation) ? ($oSalutation->GetName()) : ('');

            $aAddress['sFirstName'] = $oOrder->fieldAdrShippingFirstname;
            $aAddress['sLastName'] = $oOrder->fieldAdrShippingLastname;
            $aAddress['sAdditionalInfo'] = $oOrder->fieldAdrShippingAdditionalInfo;
            $aAddress['sAddressStreet'] = $oOrder->fieldAdrShippingStreet;
            $aAddress['sAddressStreetNr'] = $oOrder->fieldAdrShippingStreetnr;
            $aAddress['sAddressZip'] = $oOrder->fieldAdrShippingPostalcode;
            $aAddress['sAddressCity'] = $oOrder->fieldAdrShippingCity;
            $aAddress['sAddressTelephone'] = $oOrder->fieldAdrShippingTelefon;
            $aAddress['sAddressFax'] = $oOrder->fieldAdrShippingFax;

            $oCountry = $oOrder->GetFieldAdrShippingCountry();
            if (null !== $oCountry) {
                if ($bCachingEnabled) {
                    $oCacheTriggerManager->addTrigger($oCountry->table, $oCountry->id);
                }
                $aAddress['sAddressCountry'] = (null !== $oCountry) ? ($oCountry->GetName()) : ('');
            }
        }

        return $aAddress;
    }
protected function getAddress(TdbShopOrder $oOrder, $iAddressType, IMapperCacheTriggerRestricted $oCacheTriggerManager, $bCachingEnabled)
    {
        $aAddress = array();

        if (self::ADDRESS_TYPE_BILLING === $iAddressType) {
            $oSalutation = $oOrder->GetFieldAdrBillingSalutation();
            if ($oSalutation && $bCachingEnabled) {
                $oCacheTriggerManager->addTrigger($oSalutation->table, $oSalutation->id);
            }
            $aAddress['sSalutation'] = (null !== $oSalutation) ? ($oSalutation->GetName()) : ('');

            $aAddress['sFirstName'] = $oOrder->fieldAdrBillingFirstname;
            $aAddress['sLastName'] = $oOrder->fieldAdrBillingLastname;
            $aAddress['sAdditionalInfo'] = $oOrder->fieldAdrBillingAdditionalInfo;
            $aAddress['sAddressStreet'] = $oOrder->fieldAdrBillingStreet;
            $aAddress['sAddressStreetNr'] = $oOrder->fieldAdrBillingStreetnr;
            $aAddress['sAddressZip'] = $oOrder->fieldAdrBillingPostalcode;
            $aAddress['sAddressCity'] = $oOrder->fieldAdrBillingCity;
            $aAddress['sAddressTelephone'] = $oOrder->fieldAdrBillingTelefon;
            $aAddress['sAddressFax'] = $oOrder->fieldAdrBillingFax;

            $oCountry = $oOrder->GetFieldAdrBillingCountry();
            if (null !== $oCountry) {
                if ($bCachingEnabled) {
                    $oCacheTriggerManager->addTrigger($oCountry->table, $oCountry->id);
                }
                $aAddress['sAddressCountry'] = (null !== $oCountry) ? ($oCountry->GetName()) : ('');
            }
        } elseif (self::ADDRESS_TYPE_SHIPPING === $iAddressType) {
            $oSalutation = $oOrder->GetFieldAdrShippingSalutation();
            if ($oSalutation && $bCachingEnabled) {
                $oCacheTriggerManager->addTrigger($oSalutation->table, $oSalutation->id);
            }
            $aAddress['sSalutation'] = (null !== $oSalutation) ? ($oSalutation->GetName()) : ('');

            $aAddress['sFirstName'] = $oOrder->fieldAdrShippingFirstname;
            $aAddress['sLastName'] = $oOrder->fieldAdrShippingLastname;
            $aAddress['sAdditionalInfo'] = $oOrder->fieldAdrShippingAdditionalInfo;
            $aAddress['sAddressStreet'] = $oOrder->fieldAdrShippingStreet;
            $aAddress['sAddressStreetNr'] = $oOrder->fieldAdrShippingStreetnr;
            $aAddress['sAddressZip'] = $oOrder->fieldAdrShippingPostalcode;
            $aAddress['sAddressCity'] = $oOrder->fieldAdrShippingCity;
            $aAddress['sAddressTelephone'] = $oOrder->fieldAdrShippingTelefon;
            $aAddress['sAddressFax'] = $oOrder->fieldAdrShippingFax;

            $oCountry = $oOrder->GetFieldAdrShippingCountry();
            if (null !== $oCountry) {
                if ($bCachingEnabled) {
                    $oCacheTriggerManager->addTrigger($oCountry->table, $oCountry->id);
                }
                $aAddress['sAddressCountry'] = (null !== $oCountry) ? ($oCountry->GetName()) : ('');
            }
        }

        return $aAddress;
    }
protected function getAddress ( TdbShopOrder $ oOrder , $ iAddressType , IMapperCacheTriggerRestricted $ oCacheTriggerManager , $ bCachingEnabled ) { $ aAddress = array ( ) ; if ( self :: ADDRESS_TYPE_BILLING === $ iAddressType ) { $ oSalutation = $ oOrder -> GetFieldAdrBillingSalutation ( ) ; if ( $ oSalutation && $ bCachingEnabled ) { $ oCacheTriggerManager -> addTrigger ( $ oSalutation -> table , $ oSalutation -> id ) ; } $ aAddress [ 'sSalutation' ] = ( null !== $ oSalutation ) ? ( $ oSalutation -> GetName ( ) ) : ( '' ) ; $ aAddress [ 'sFirstName' ] = $ oOrder -> fieldAdrBillingFirstname ; $ aAddress [ 'sLastName' ] = $ oOrder -> fieldAdrBillingLastname ; $ aAddress [ 'sAdditionalInfo' ] = $ oOrder -> fieldAdrBillingAdditionalInfo ; $ aAddress [ 'sAddressStreet' ] = $ oOrder -> fieldAdrBillingStreet ; $ aAddress [ 'sAddressStreetNr' ] = $ oOrder -> fieldAdrBillingStreetnr ; $ aAddress [ 'sAddressZip' ] = $ oOrder -> fieldAdrBillingPostalcode ; $ aAddress [ 'sAddressCity' ] = $ oOrder -> fieldAdrBillingCity ; $ aAddress [ 'sAddressTelephone' ] = $ oOrder -> fieldAdrBillingTelefon ; $ aAddress [ 'sAddressFax' ] = $ oOrder -> fieldAdrBillingFax ; $ oCountry = $ oOrder -> GetFieldAdrBillingCountry ( ) ; if ( null !== $ oCountry ) { if ( $ bCachingEnabled ) { $ oCacheTriggerManager -> addTrigger ( $ oCountry -> table , $ oCountry -> id ) ; } $ aAddress [ 'sAddressCountry' ] = ( null !== $ oCountry ) ? ( $ oCountry -> GetName ( ) ) : ( '' ) ; } } elseif ( self :: ADDRESS_TYPE_SHIPPING === $ iAddressType ) { $ oSalutation = $ oOrder -> GetFieldAdrShippingSalutation ( ) ; if ( $ oSalutation && $ bCachingEnabled ) { $ oCacheTriggerManager -> addTrigger ( $ oSalutation -> table , $ oSalutation -> id ) ; } $ aAddress [ 'sSalutation' ] = ( null !== $ oSalutation ) ? ( $ oSalutation -> GetName ( ) ) : ( '' ) ; $ aAddress [ 'sFirstName' ] = $ oOrder -> fieldAdrShippingFirstname ; $ aAddress [ 'sLastName' ] = $ oOrder -> fieldAdrShippingLastname ; $ aAddress [ 'sAdditionalInfo' ] = $ oOrder -> fieldAdrShippingAdditionalInfo ; $ aAddress [ 'sAddressStreet' ] = $ oOrder -> fieldAdrShippingStreet ; $ aAddress [ 'sAddressStreetNr' ] = $ oOrder -> fieldAdrShippingStreetnr ; $ aAddress [ 'sAddressZip' ] = $ oOrder -> fieldAdrShippingPostalcode ; $ aAddress [ 'sAddressCity' ] = $ oOrder -> fieldAdrShippingCity ; $ aAddress [ 'sAddressTelephone' ] = $ oOrder -> fieldAdrShippingTelefon ; $ aAddress [ 'sAddressFax' ] = $ oOrder -> fieldAdrShippingFax ; $ oCountry = $ oOrder -> GetFieldAdrShippingCountry ( ) ; if ( null !== $ oCountry ) { if ( $ bCachingEnabled ) { $ oCacheTriggerManager -> addTrigger ( $ oCountry -> table , $ oCountry -> id ) ; } $ aAddress [ 'sAddressCountry' ] = ( null !== $ oCountry ) ? ( $ oCountry -> GetName ( ) ) : ( '' ) ; } } return $ aAddress ; }
get the value map for one address type can be defined by using the class constants.

@param TdbShopOrder $oOrder
@param int          $iAddressType use constants of the class to define the type to be fetched from

@return array
get the value map for one address type can be defined by using the class constants .