Sets the media queries for the rule.

@param MediaQuery[]|MediaQuery $queries
@return $this
8766
public function setQueries($queries)
    {
        $this->queries = [];
        if (!is_array($queries)) {
            $queries = [$queries];
        }
        foreach ($queries as $query) {
            $this->addQuery($query);
        }

        return $this;
    }
165834
public function prepareQuery($query, $params = false)
    {
        if (isset($params) and is_array($params)) {
            $this->prepareParms($params);
        }

        if (!isset($this->setQuery)) {
            $this->setQuery = $query . ' ';
        } else {
            $this->setQuery .= $this->getQuery() . ' ' . $query . ' ';
        }

        return $this;
    }
1228752
public function filters(Collection $filters)
    {
        foreach ($filters as $element) {
            // do not apply filter if no request var were found.
            if (!app('request')->has($element->id())) {
                continue;
            }

            $this->assemblyQuery($element);
        }

        return $this;
    }
851785
public function setFilters($filters = []) {
		if ($filters) {
			foreach ($filters as $key => $value) {
				$this->setFilter($key, $value);
			}
		}

		return $this;
	}
527886
public function applyFilters($filters)
    {
        foreach ($filters as $key => $value) {
            $this->filters[$key] = $value;
        }

        return $this;
    }
3192
public function setQuery($query)
    {
        if (is_string($query)) {
            $output = null;
            parse_str($query, $output);
            $this->query = new QueryString($output);
        } elseif (is_array($query)) {
            $this->query = new QueryString($query);
        } elseif ($query instanceof QueryString) {
            $this->query = $query;
        }

        return $this;
    }
1100811
private function _or($queries)
    {
        $this->where['$or'] = array();
        $length = count($queries);
        for ($i = 0; $i < $length; $i++)
        {
            $this->where['$or'][] = $queries[$i]->where;
        }

        return $this;
    }
858972
private function executeQueries(array $queries)
    {
        foreach ($queries as $query) {
            $this->connection->prepare($query)->execute();
        }
    }
996678
public function convertArrayToObjects(array $mediaQueryRules, array $objects = array())
    {
        foreach ($mediaQueryRules as $order => $ruleSet) {
            foreach (reset($ruleSet) as $rule) {
                $objects = array_merge($objects, $this->convertToObjects(key($ruleSet), $rule, $order));
            }
        }

        return $objects;
    }
828280
public function addQueryParams(array $queryParams)
    {
        $this->data['query'] = array_merge(Helper::getValue($this->data['query'], []), $queryParams);
        $this->data['query'] = array_filter($this->data['query']);
        return $this;
    }
1299236
public function removeQueries(array $queries) : self
    {
        foreach ($queries as $key) {
            if (!is_string($key)) {
                throw new \InvalidArgumentException("Invalid querystring '" . $key . "'");
            }

            if (isset($this->uri['query'][$key])) {
                unset($this->uri['query'][$key]);
            }
        }

        return $this;
    }
431730
public function setQuery(?string $query = null): self
    {
        $this->query = $query;
        $this->query = $this->query ?? '';

        return $this;
    }
890138
public function setFilters(array $filters)
    {
        $this->filters = $filters;

        $this->updateInternalState();

        $this->handleChangedParameters();

        return $this;
    }
83057
public function setQueryFromArguments($newArguments)
    {
        $this->setQueryString(trim($newArguments['queryString']));
        $this->querySwitchFulltext = ($newArguments['querySwitchFulltext'] != '');
        $this->queryStringTitle = trim($newArguments['queryStringTitle']);
        $this->querySwitchJournalOnly = ($newArguments['querySwitchJournalOnly'] != '');
        $this->queryStringPerson = trim($newArguments['queryStringPerson']);
        $this->queryStringKeyword = trim($newArguments['queryStringKeyword']);
        $this->queryStringDate = trim($newArguments['queryStringDate']);
    }
809306
public function raw($query, array $bindings = array())
    {
        if (!empty($bindings)) {
            foreach ($bindings as $column => $value) {
                $this->bind($column, $value);
            }
        }

        $this->queryBuilder->raw($query);
        return $this;
    }
1094087
public function setFilters($filters = [])
    {
        foreach ($filters as $field => $rules) {
            if ($field === 'fullSearch') {
                $this->addFilter($field, $rules, null);
                continue;
            }

            if (is_a($rules, MultiFullTextFilter::class)) {
                $this->addFilter($field, $rules, null);
                continue;
            }

            foreach ($rules as $operator => $value) {
                if (!in_array($operator, $this->availableFilters) || (empty($value) && $value != '0')) {
                    continue;
                }
                $this->addFilter($field, $value, $operator);
            }
        }

        return $this;
    }
1005762
public function query($query)
    {
        \Assert\that($query)->string()->notEmpty();

        $this->query = $query;

        return $this;
    }