src/DatabaseQuery.php
public function extendWhere($outerGlue, $conditions, $innerGlue = 'AND')
	{
		// Replace the current WHERE with a new one which has the old one as an unnamed child.
		$this->where = new Query\QueryElement('WHERE', $this->where->setName('()'), " $outerGlue ");

		// Append the new conditions as a new unnamed child.
		$this->where->append(new Query\QueryElement('()', $conditions, " $innerGlue "));

		return $this;
	}
public function extendWhere($outerGlue, $conditions, $innerGlue = 'AND')
	{
		// Replace the current WHERE with a new one which has the old one as an unnamed child.
		$this->where = new Query\QueryElement('WHERE', $this->where->setName('()'), " $outerGlue ");

		// Append the new conditions as a new unnamed child.
		$this->where->append(new Query\QueryElement('()', $conditions, " $innerGlue "));

		return $this;
	}
public function extendWhere ( $ outerGlue , $ conditions , $ innerGlue = 'AND' ) { // Replace the current WHERE with a new one which has the old one as an unnamed child. $ this -> where = new Query \ QueryElement ( 'WHERE' , $ this -> where -> setName ( '()' ) , " $outerGlue " ) ; // Append the new conditions as a new unnamed child. $ this -> where -> append ( new Query \ QueryElement ( '()' , $ conditions , " $innerGlue " ) ) ; return $ this ; }
Extend the WHERE clause with a single condition or an array of conditions, with a potentially
different logical operator from the one in the current WHERE clause.

Usage:
$query->where(array('a = 1', 'b = 2'))->extendWhere('XOR', array('c = 3', 'd = 4'));
will produce: WHERE ((a = 1 AND b = 2) XOR (c = 3 AND d = 4)

@param   string  $outerGlue   The glue by which to join the conditions to the current WHERE conditions.
@param   mixed   $conditions  A string or array of WHERE conditions.
@param   string  $innerGlue   The glue by which to join the conditions. Defaults to AND.

@return  DatabaseQuery  Returns this object to allow chaining.

@since   1.3.0
Extend the WHERE clause with a single condition or an array of conditions with a potentially different logical operator from the one in the current WHERE clause .