You are here

public function Criteria::andWhere in Plug 7

Appends the where expression to evaluate when this Criteria is searched for using an AND with previous expression.

Parameters

Expression $expression:

Return value

Criteria

File

lib/doctrine/collections/lib/Doctrine/Common/Collections/Criteria.php, line 134

Class

Criteria
Criteria for filtering Selectable collections.

Namespace

Doctrine\Common\Collections

Code

public function andWhere(Expression $expression) {
  if ($this->expression === null) {
    return $this
      ->where($expression);
  }
  $this->expression = new CompositeExpression(CompositeExpression::TYPE_AND, array(
    $this->expression,
    $expression,
  ));
  return $this;
}