protected function _loadServices( $id, $fresh )
	{
		$items = array();
		$manager = $this->getSubManager( 'service' );

		$criteria = $manager->createSearch();
		$criteria->setConditions( $criteria->compare( '==', 'order.base.service.baseid', $id ) );

		foreach( $manager->searchItems( $criteria ) as $item )
		{
			if( $fresh === true )
			{
				foreach( $item->getAttributes() as $attribute )
				{
						$attribute->setId( null );
						$attribute->setServiceId( null );
				}

				$item->setBaseId( null );
				$item->setId( null );
			}

			$items[ $item->getType() ] = $item;
		}

		return $items;
	}
protected function _loadServices( $id, $fresh )
	{
		$items = array();
		$manager = $this->getSubManager( 'service' );

		$criteria = $manager->createSearch();
		$criteria->setConditions( $criteria->compare( '==', 'order.base.service.baseid', $id ) );

		foreach( $manager->searchItems( $criteria ) as $item )
		{
			if( $fresh === true )
			{
				foreach( $item->getAttributes() as $attribute )
				{
						$attribute->setId( null );
						$attribute->setServiceId( null );
				}

				$item->setBaseId( null );
				$item->setId( null );
			}

			$items[ $item->getType() ] = $item;
		}

		return $items;
	}
protected function _loadServices ( $ id , $ fresh ) { $ items = array ( ) ; $ manager = $ this -> getSubManager ( 'service' ) ; $ criteria = $ manager -> createSearch ( ) ; $ criteria -> setConditions ( $ criteria -> compare ( '==' , 'order.base.service.baseid' , $ id ) ) ; foreach ( $ manager -> searchItems ( $ criteria ) as $ item ) { if ( $ fresh === true ) { foreach ( $ item -> getAttributes ( ) as $ attribute ) { $ attribute -> setId ( null ) ; $ attribute -> setServiceId ( null ) ; } $ item -> setBaseId ( null ) ; $ item -> setId ( null ) ; } $ items [ $ item -> getType ( ) ] = $ item ; } return $ items ; }
Retrieves the services of the order from the storage.

@param integer $id Order base ID
@param boolean $fresh Create new items by copying the existing ones and remove their IDs
@return array List of items implementing MShop_Order_Item_Service_Interface
Retrieves the services of the order from the storage .