public function check( $what = MShop_Order_Item_Base_Abstract::PARTS_ALL )
	{
		$this->_checkParts( $what );

		$this->_notifyListeners( 'check.before', $what );

		if( ( $what & MShop_Order_Item_Base_Abstract::PARTS_PRODUCT ) && ( count($this->_products) < 1 ) ) {
			throw new MShop_Order_Exception( sprintf( 'Basket empty' ) );
		}

		$this->_notifyListeners( 'check.after', $what );
	}
public function check( $what = MShop_Order_Item_Base_Abstract::PARTS_ALL )
	{
		$this->_checkParts( $what );

		$this->_notifyListeners( 'check.before', $what );

		if( ( $what & MShop_Order_Item_Base_Abstract::PARTS_PRODUCT ) && ( count($this->_products) < 1 ) ) {
			throw new MShop_Order_Exception( sprintf( 'Basket empty' ) );
		}

		$this->_notifyListeners( 'check.after', $what );
	}
public function check ( $ what = MShop_Order_Item_Base_Abstract :: PARTS_ALL ) { $ this -> _checkParts ( $ what ) ; $ this -> _notifyListeners ( 'check.before' , $ what ) ; if ( ( $ what & MShop_Order_Item_Base_Abstract :: PARTS_PRODUCT ) && ( count ( $ this -> _products ) < 1 ) ) { throw new MShop_Order_Exception ( sprintf ( 'Basket empty' ) ) ; } $ this -> _notifyListeners ( 'check.after' , $ what ) ; }
Tests if all necessary items are available to create the order.

@param integer $what Test for the specifice type of completeness
@throws MShop_Order_Exception if there are no products in the basket
Tests if all necessary items are available to create the order .