src/Neevo/BaseStatement.php
public function where($expr, $value = true){
		if((is_array($expr) || $expr instanceof Traversable) && $value === true){
			foreach($expr as $key => $val) $this->where($key, $val);
			return $this;
		}

		if($this->validateConditions())
			return $this;

		$this->resetState();

		// Simple format
		if(strpos($expr, '%') === false){
			$field = trim($expr);
			$this->conditions[] = array(
				'simple' => true,
				'field' => $field,
				'value' => $value,
				'glue' => 'AND'
			);
			if($value instanceof self)
				$this->subqueries[] = $value;
			return $this;
		}

		// Format with modifiers
		$args = func_get_args();
		array_shift($args);
		preg_match_all('~%(bin|sub|b|i|f|s|d|a|l)?~i', $expr, $matches);
		$this->conditions[] = array(
			'simple' => false,
			'expr' => $expr,
			'modifiers' => $matches[0],
			'types' => $matches[1],
			'values' => $args,
			'glue' => 'AND'
		);
		foreach($args as $arg){
			if($arg instanceof self)
				$this->subqueries[] = $arg;
		}
		return $this;
	}
public function where($expr, $value = true){
		if((is_array($expr) || $expr instanceof Traversable) && $value === true){
			foreach($expr as $key => $val) $this->where($key, $val);
			return $this;
		}

		if($this->validateConditions())
			return $this;

		$this->resetState();

		// Simple format
		if(strpos($expr, '%') === false){
			$field = trim($expr);
			$this->conditions[] = array(
				'simple' => true,
				'field' => $field,
				'value' => $value,
				'glue' => 'AND'
			);
			if($value instanceof self)
				$this->subqueries[] = $value;
			return $this;
		}

		// Format with modifiers
		$args = func_get_args();
		array_shift($args);
		preg_match_all('~%(bin|sub|b|i|f|s|d|a|l)?~i', $expr, $matches);
		$this->conditions[] = array(
			'simple' => false,
			'expr' => $expr,
			'modifiers' => $matches[0],
			'types' => $matches[1],
			'values' => $args,
			'glue' => 'AND'
		);
		foreach($args as $arg){
			if($arg instanceof self)
				$this->subqueries[] = $arg;
		}
		return $this;
	}
public function where ( $ expr , $ value = true ) { if ( ( is_array ( $ expr ) || $ expr instanceof Traversable ) && $ value === true ) { foreach ( $ expr as $ key => $ val ) $ this -> where ( $ key , $ val ) ; return $ this ; } if ( $ this -> validateConditions ( ) ) return $ this ; $ this -> resetState ( ) ; // Simple format if ( strpos ( $ expr , '%' ) === false ) { $ field = trim ( $ expr ) ; $ this -> conditions [ ] = array ( 'simple' => true , 'field' => $ field , 'value' => $ value , 'glue' => 'AND' ) ; if ( $ value instanceof self ) $ this -> subqueries [ ] = $ value ; return $ this ; } // Format with modifiers $ args = func_get_args ( ) ; array_shift ( $ args ) ; preg_match_all ( '~%(bin|sub|b|i|f|s|d|a|l)?~i' , $ expr , $ matches ) ; $ this -> conditions [ ] = array ( 'simple' => false , 'expr' => $ expr , 'modifiers' => $ matches [ 0 ] , 'types' => $ matches [ 1 ] , 'values' => $ args , 'glue' => 'AND' ) ; foreach ( $ args as $ arg ) { if ( $ arg instanceof self ) $ this -> subqueries [ ] = $ arg ; } return $ this ; }
Sets WHERE condition. Accepts infinite arguments.

More calls append conditions with 'AND' operator. Conditions can also be specified
by calling and() / or() methods the same way as where().
Corresponding operator will be used.

Accepts associative array in field => value form.
@param string|array|Traversable $expr
@param mixed $value
@return BaseStatement fluent interface
Sets WHERE condition . Accepts infinite arguments .