public function enterExpression(Expression $expr)
    {
        $hash = spl_object_hash($expr);

        if ($expr instanceof Key) {
            if (!count($this->hashes)) {
                $this->qb->andWhere($this->toExpr($expr));
            } else {
                $lastHash = end($this->hashes);

                $this->map[$lastHash][] = $this->toExpr($expr);
            }
        } elseif ($expr instanceof OrX) {
            $this->hashes[] = $hash;
            $this->map[$hash] = [];
        } elseif ($expr instanceof AndX) {
            $this->hashes[] = $hash;
            $this->map[$hash] = [];
        }

        return $expr;
    }
public function enterExpression(Expression $expr)
    {
        $hash = spl_object_hash($expr);

        if ($expr instanceof Key) {
            if (!count($this->hashes)) {
                $this->qb->andWhere($this->toExpr($expr));
            } else {
                $lastHash = end($this->hashes);

                $this->map[$lastHash][] = $this->toExpr($expr);
            }
        } elseif ($expr instanceof OrX) {
            $this->hashes[] = $hash;
            $this->map[$hash] = [];
        } elseif ($expr instanceof AndX) {
            $this->hashes[] = $hash;
            $this->map[$hash] = [];
        }

        return $expr;
    }
public function enterExpression ( Expression $ expr ) { $ hash = spl_object_hash ( $ expr ) ; if ( $ expr instanceof Key ) { if ( ! count ( $ this -> hashes ) ) { $ this -> qb -> andWhere ( $ this -> toExpr ( $ expr ) ) ; } else { $ lastHash = end ( $ this -> hashes ) ; $ this -> map [ $ lastHash ] [ ] = $ this -> toExpr ( $ expr ) ; } } elseif ( $ expr instanceof OrX ) { $ this -> hashes [ ] = $ hash ; $ this -> map [ $ hash ] = [ ] ; } elseif ( $ expr instanceof AndX ) { $ this -> hashes [ ] = $ hash ; $ this -> map [ $ hash ] = [ ] ; } return $ expr ; }
Adds `Key` expressions to the query or stores children of OrX and AndX expressions in memory to be added
on the leaveExpression for OrX or AndX expressions.

{@inheritdoc}
Adds Key expressions to the query or stores children of OrX and AndX expressions in memory to be added on the leaveExpression for OrX or AndX expressions .