public function setAddress( $type, $value )
	{
		$address = MShop_Factory::createManager( $this->_getContext(), 'order/base/address' )->createItem();
		$address->setType( $type );

		if( $value instanceof MShop_Common_Item_Address_Interface )
		{
			$address->copyFrom( $value );
			$this->_basket->setAddress( $address, $type );
		}
		else if( is_array( $value ) )
		{
			$this->_setAddressFromArray( $address, $value );
			$this->_basket->setAddress( $address, $type );
		}
		else if( $value === null )
		{
			$this->_basket->deleteAddress( $type );
		}
		else
		{
			throw new Controller_Frontend_Basket_Exception( sprintf( 'Invalid value for address type "%1$s"', $type ) );
		}

		$this->_domainManager->setSession( $this->_basket );
	}
public function setAddress( $type, $value )
	{
		$address = MShop_Factory::createManager( $this->_getContext(), 'order/base/address' )->createItem();
		$address->setType( $type );

		if( $value instanceof MShop_Common_Item_Address_Interface )
		{
			$address->copyFrom( $value );
			$this->_basket->setAddress( $address, $type );
		}
		else if( is_array( $value ) )
		{
			$this->_setAddressFromArray( $address, $value );
			$this->_basket->setAddress( $address, $type );
		}
		else if( $value === null )
		{
			$this->_basket->deleteAddress( $type );
		}
		else
		{
			throw new Controller_Frontend_Basket_Exception( sprintf( 'Invalid value for address type "%1$s"', $type ) );
		}

		$this->_domainManager->setSession( $this->_basket );
	}
public function setAddress ( $ type , $ value ) { $ address = MShop_Factory :: createManager ( $ this -> _getContext ( ) , 'order/base/address' ) -> createItem ( ) ; $ address -> setType ( $ type ) ; if ( $ value instanceof MShop_Common_Item_Address_Interface ) { $ address -> copyFrom ( $ value ) ; $ this -> _basket -> setAddress ( $ address , $ type ) ; } else if ( is_array ( $ value ) ) { $ this -> _setAddressFromArray ( $ address , $ value ) ; $ this -> _basket -> setAddress ( $ address , $ type ) ; } else if ( $ value === null ) { $ this -> _basket -> deleteAddress ( $ type ) ; } else { throw new Controller_Frontend_Basket_Exception ( sprintf ( 'Invalid value for address type "%1$s"' , $ type ) ) ; } $ this -> _domainManager -> setSession ( $ this -> _basket ) ; }
Sets the address of the customer in the basket.

@param string $type Address type constant from MShop_Order_Item_Base_Address_Abstract
@param MShop_Common_Item_Address_Interface|array|null $value Address object or array with key/value pairs of address or null to remove address from basket
@throws Controller_Frontend_Basket_Exception If the billing or delivery address is not of any required type of
if one of the keys is invalid when using an array with key/value pairs
Sets the address of the customer in the basket .