private function _getCriteriaNames( MW_Common_Criteria_Expression_Interface $expr )
	{
		if( $expr instanceof MW_Common_Criteria_Expression_Compare_Interface ) {
			return array( $expr->getName() );
		}

		if( $expr instanceof MW_Common_Criteria_Expression_Combine_Interface )
		{
			$list = array();
			foreach( $expr->getExpressions() as $item ) {
				$list = array_merge( $list, $this->_getCriteriaNames( $item ) );
			}
			return $list;
		}

		if( $expr instanceof MW_Common_Criteria_Expression_Sort_Interface ) {
			return array( $expr->getName() );
		}

		return array();
	}
private function _getCriteriaNames( MW_Common_Criteria_Expression_Interface $expr )
	{
		if( $expr instanceof MW_Common_Criteria_Expression_Compare_Interface ) {
			return array( $expr->getName() );
		}

		if( $expr instanceof MW_Common_Criteria_Expression_Combine_Interface )
		{
			$list = array();
			foreach( $expr->getExpressions() as $item ) {
				$list = array_merge( $list, $this->_getCriteriaNames( $item ) );
			}
			return $list;
		}

		if( $expr instanceof MW_Common_Criteria_Expression_Sort_Interface ) {
			return array( $expr->getName() );
		}

		return array();
	}
private function _getCriteriaNames ( MW_Common_Criteria_Expression_Interface $ expr ) { if ( $ expr instanceof MW_Common_Criteria_Expression_Compare_Interface ) { return array ( $ expr -> getName ( ) ) ; } if ( $ expr instanceof MW_Common_Criteria_Expression_Combine_Interface ) { $ list = array ( ) ; foreach ( $ expr -> getExpressions ( ) as $ item ) { $ list = array_merge ( $ list , $ this -> _getCriteriaNames ( $ item ) ) ; } return $ list ; } if ( $ expr instanceof MW_Common_Criteria_Expression_Sort_Interface ) { return array ( $ expr -> getName ( ) ) ; } return array ( ) ; }
Returns a list of criteria names from a expression and its sub-expressions.

@param MW_Common_Criteria_Expression_Interface Criteria object
@return array List of criteria names
Returns a list of criteria names from a expression and its sub - expressions .