public function toConditions( array $array )
	{
		if( count( $array ) === 0 ) {
			return $this->compare( '==', '1', '1' );
		}

		if( ( list( $op, $value ) = each( $array ) ) === false ) {
			throw new MW_Common_Exception( sprintf( 'Invalid condition array "%1$s"', json_encode( $array ) ) );
		}

		$operators = $this->getOperators();

		if( in_array( $op, $operators['combine'] ) ) {
			return $this->_createCombineExpression( $op, (array) $value );
		}
		else if( in_array( $op, $operators['compare'] ) ) {
			return $this->_createCompareExpression( $op, (array) $value );
		}

		throw new MW_Common_Exception( sprintf( 'Invalid operator "%1$s"', $op ) );
	}
public function toConditions( array $array )
	{
		if( count( $array ) === 0 ) {
			return $this->compare( '==', '1', '1' );
		}

		if( ( list( $op, $value ) = each( $array ) ) === false ) {
			throw new MW_Common_Exception( sprintf( 'Invalid condition array "%1$s"', json_encode( $array ) ) );
		}

		$operators = $this->getOperators();

		if( in_array( $op, $operators['combine'] ) ) {
			return $this->_createCombineExpression( $op, (array) $value );
		}
		else if( in_array( $op, $operators['compare'] ) ) {
			return $this->_createCompareExpression( $op, (array) $value );
		}

		throw new MW_Common_Exception( sprintf( 'Invalid operator "%1$s"', $op ) );
	}
public function toConditions ( array $ array ) { if ( count ( $ array ) === 0 ) { return $ this -> compare ( '==' , '1' , '1' ) ; } if ( ( list ( $ op , $ value ) = each ( $ array ) ) === false ) { throw new MW_Common_Exception ( sprintf ( 'Invalid condition array "%1$s"' , json_encode ( $ array ) ) ) ; } $ operators = $ this -> getOperators ( ) ; if ( in_array ( $ op , $ operators [ 'combine' ] ) ) { return $ this -> _createCombineExpression ( $ op , ( array ) $ value ) ; } else if ( in_array ( $ op , $ operators [ 'compare' ] ) ) { return $ this -> _createCompareExpression ( $ op , ( array ) $ value ) ; } throw new MW_Common_Exception ( sprintf ( 'Invalid operator "%1$s"' , $ op ) ) ; }
Creates condition expressions from a multi-dimensional associative array.

The simplest form of a valid associative array is a single comparison:
$array = array(
'==' => array( 'name' => 'value' ),
);

Combining several conditions can look like:
$array = array(
'&&' => array(
0 => array(
'==' => array( 'name' => 'value' ),
1 => array(
'==' => array( 'name2' => 'value2' ),
),
),
);

Nested combine operators are also possible.

@param array $array Multi-dimensional associative array containing the expression arrays
@return MW_Common_Criteria_Expression_Interface Condition expressions (maybe nested)
@throws MW_Common_Exception If given array is invalid
Creates condition expressions from a multi - dimensional associative array .