Adldap\Query\Grammar::compileOrWheres PHP Method

compileOrWheres() protected method

Assembles all or where clauses in the current orWheres property.
protected compileOrWheres ( array $orWheres, string $query = '' ) : string
$orWheres array
$query string
return string
    protected function compileOrWheres(array $orWheres, $query = '')
    {
        $ors = '';
        foreach ($orWheres as $where) {
            $ors .= $this->compileWhere($where);
        }
        // Make sure we wrap the query in an 'or' if using multiple
        // orWheres. For example (|(QUERY)(ORWHEREQUERY)).
        if ($query && count($orWheres) > 0 || count($orWheres) > 1) {
            $query .= $this->compileOr($ors);
        } else {
            $query .= $ors;
        }
        return $query;
    }