protected function _buildXMLAddresses( MShop_Common_Manager_Interface $orderBaseManager,
		MShop_Order_Item_Base_Interface $base, DOMDocument $dom, DOMElement $orderitem )
	{
		$orderAddressManager = $orderBaseManager->getSubManager( 'address' );
		$criteria = $orderAddressManager->createSearch();
		$criteria->setConditions( $criteria->compare( '==', 'order.base.address.baseid', $base->getId() ) );
		$criteria->setSortations( array( $criteria->sort( '+', 'order.base.address.type' ) ) );
		$addresses = $orderAddressManager->searchItems( $criteria );

		$addresslist = $dom->createElement( 'addresslist' );

		foreach( $addresses as $address ) {
			$this->_buildXMLAddress( $address, $dom, $addresslist );
		}

		$orderitem->appendChild( $addresslist );
	}
protected function _buildXMLAddresses( MShop_Common_Manager_Interface $orderBaseManager,
		MShop_Order_Item_Base_Interface $base, DOMDocument $dom, DOMElement $orderitem )
	{
		$orderAddressManager = $orderBaseManager->getSubManager( 'address' );
		$criteria = $orderAddressManager->createSearch();
		$criteria->setConditions( $criteria->compare( '==', 'order.base.address.baseid', $base->getId() ) );
		$criteria->setSortations( array( $criteria->sort( '+', 'order.base.address.type' ) ) );
		$addresses = $orderAddressManager->searchItems( $criteria );

		$addresslist = $dom->createElement( 'addresslist' );

		foreach( $addresses as $address ) {
			$this->_buildXMLAddress( $address, $dom, $addresslist );
		}

		$orderitem->appendChild( $addresslist );
	}
protected function _buildXMLAddresses ( MShop_Common_Manager_Interface $ orderBaseManager , MShop_Order_Item_Base_Interface $ base , DOMDocument $ dom , DOMElement $ orderitem ) { $ orderAddressManager = $ orderBaseManager -> getSubManager ( 'address' ) ; $ criteria = $ orderAddressManager -> createSearch ( ) ; $ criteria -> setConditions ( $ criteria -> compare ( '==' , 'order.base.address.baseid' , $ base -> getId ( ) ) ) ; $ criteria -> setSortations ( array ( $ criteria -> sort ( '+' , 'order.base.address.type' ) ) ) ; $ addresses = $ orderAddressManager -> searchItems ( $ criteria ) ; $ addresslist = $ dom -> createElement ( 'addresslist' ) ; foreach ( $ addresses as $ address ) { $ this -> _buildXMLAddress ( $ address , $ dom , $ addresslist ) ; } $ orderitem -> appendChild ( $ addresslist ) ; }
Adds the address list to the XML object

@param MShop_Order_Manager_Base_Interface $orderBaseManager Order base manager object
@param MShop_Order_Item_Base_Interface $base Order base object
@param DOMDocument $dom DOM document object with contains the XML structure
@param DOMElement $orderitem DOM element which will be the parent of the new child
@throws DOMException If an error occures
Adds the address list to the XML object