Set the hint.

@param array|null The hint.

@return \Mandango\Query The query instance (fluent interface).

@api
330345
public function hint($hint)
    {
        if (null !== $hint && !is_array($hint)) {
            throw new \InvalidArgumentException(sprintf('The hint "%s" is not valid.', $hint));
        }

        $this->hint = $hint;

        return $this;
    }
490100
public function setResponse(array $data = null)
    {
        $this->DataArray    = $data;
        $this->ResponseData = json_encode($data);
        return $this;
    }
672789
public function hint($keyPattern)
    {
        $this->hint = $keyPattern;
        $this->mongoCursor->hint($keyPattern);
        return $this;
    }
885252
protected function setJoin($query = null)
    {
        $query = $query ?: $this->query;

        $baseTable = $this->related->getTable();

        $key = $baseTable.'.'.$this->related->getKeyName();

        $query->join($this->table, $key, '=', $this->getOtherKey());

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

        return $this;
    }
646090
public function setQuery(array $query) : Request
    {
        $this->queryString = http_build_query($query);

        // Ensure that we get a value for getQuery() that's consistent with the query string, and whose scalar values
        // have all been converted to strings, to get a result similar to what we'd get with an incoming HTTP request.
        parse_str($this->queryString, $this->query);

        $this->requestUri = $this->path;

        if ($this->queryString !== '') {
            $this->requestUri .= '?' . $this->queryString;
        }

        return $this;
    }
540996
private String getQueryString(Query query) {
        Map<String, Object> hints = query.getHints();
        return hints != null ? (String) hints.get("query") : null;
    }
93759
@Override
    public Query setHint(String hintName, Object value)
    {
        hints.put(hintName, value);
        return this;
    }
10321
public function bind($params = null)
    {

        if (is_array($params)) {
            foreach ($params as $k => $v) {
                $this->bindParam($k, $v);
            }
        }

        return $this;
    }
1350243
function ResetQuery($query = null) {
		$this->db->ar_select = array();
		$this->db->ar_distinct = FALSE;
		$this->db->ar_from = array();
		$this->db->ar_join = array();
		$this->db->ar_where = array();
		$this->db->ar_like = array();
		$this->db->ar_groupby = array();
		$this->db->ar_having = array();
		$this->db->ar_keys = array();
		$this->db->ar_limit = FALSE;
		$this->db->ar_offset = FALSE;
		$this->db->ar_order = FALSE;
		$this->db->ar_orderby = array();
		$this->db->ar_set = array();
		$this->db->ar_wherein = array();
		$this->db->ar_aliased_tables = array();
		$this->db->ar_store_array = array();

		$this->joystError = '';
		$this->continue = TRUE;
		$this->query = $query;
	}
929653
protected function hint(question_attempt $qa, question_hint $hint) {
        return html_writer::nonempty_tag('div',
                $qa->get_question()->format_hint($hint, $qa), array('class' => 'hint'));
    }
672870
public function setQuery($query = null)
    {
        $this->query = [];
        return ($query === null)
            ? $this
            : $this->addQueryData($query);
    }
247058
private function deserializeHints(Item $question, array $hints = [], array $options = [])
    {
        $hintEntities = $question->getHints()->toArray();

        foreach ($hints as $hintData) {
            $existingHint = null;

            // Searches for an existing hint entity.
            foreach ($hintEntities as $entityIndex => $entityHint) {
                /** @var Hint $entityHint */
                if ($entityHint->getUuid() === $hintData['id']) {
                    $existingHint = $entityHint;
                    unset($hintEntities[$entityIndex]);
                    break;
                }
            }

            $entity = $this->hintSerializer->deserialize($hintData, $existingHint, $options);

            if (empty($existingHint)) {
                // Creation of a new hint (we need to link it to the question)
                $question->addHint($entity);
            }
        }

        // Remaining hints are no longer in the Exercise
        if (0 < count($hintEntities)) {
            foreach ($hintEntities as $hintToRemove) {
                $question->removeHint($hintToRemove);
            }
        }
    }
1374911
public function setQuery($query)
    {
        if (!($query instanceof QueryString)) {
            $this->query = new QueryString($query);

            return $this;
        }

        $this->query = $query;

        return $this;
    }
961540
public function hint($columns, $mode = null)
    {
        $this->hint = $columns;
        $this->hintMode = $mode;
        return $this;
    }
974621
protected function setQuery($query)
    {
        if (is_array($query)) {
            $query = http_build_query($query);
        }
        
        if (!$this->isValidQuery($query)) {
            throw new \InvalidArgumentException("Invalid query '$query'");
        }
        
        $this->query = (string)$query;
    }
390262
protected function parseHint($hint): string
	{
		if(is_array($hint))
		{
			[$hint, $alias] = $hint;

			$this->aliases[$alias] = $hint;
		}

		return $hint;
	}