set array of values.

@return Query
430932
public function value()
    {
        $values = func_get_args();
        //
        if (Collection::count($values) == 1 && is_array($values[0])) {
            $values = $values[0];
        }
        //
        $target = '';
        //
        $i = false;
        foreach ($values as $value) {
            $value = str_replace("'", "''", $value);
            if (!$i) {
                $target .= "'$value'";
            } else {
                $target .= ",'$value'";
            }
            $i = true;
        }
        //
        $this->values = $target;
        //
        return $this;
    }
1003295
function setValues (array $values = array())
    {
        foreach ($this->getFields() as $field)
            if (array_key_exists($field->getName(), $values))
                $field->setValue($values[$field->getName()]);
        foreach ($this->dataFields as $dataKey => $dataVal)
            if (array_key_exists($dataKey, $values))
                $this->dataFields[$dataKey] = $values[$dataKey];
    }
253516
public function setQueries($queries)
    {
        if (is_string($queries[0])) {
            foreach ($queries as $k => $query) {
                $queries[$k] = new $query();
            }
        }

        foreach ($queries as $query) {
            if ($query instanceof Query) {
                $this->queries[] = $query;
            } elseif ($query instanceof Model) {
                $this->queries[] = $query::query(null, $query);
            }
        }

        return $this;
    }
939711
protected function queryValues()
    {
        foreach($this->defaultQueryParameters as $parameter => $validator){
            $value = request($parameter);
            if($value) {
                $this->{$parameter} = $value;
            }
        }

        return $this;
    }
1244726
public function setValues(array $values)
    {
        foreach ($values as $name => $value) {
            if ($element = $this->get($name)) {
                $element->setValue($value);
            }
        }
        return $this;
    }
1209891
public function setQuery($query)
    {
        $this->dispatcher
            ->dispatch(DataGridEvents::onQueryReady, new QueryEvent($this->dataGrid->getName(), $query));
        
        $this->query = $query;
        
        return $this;
    }
1082825
public function setAllValues(array $values)
    {
        foreach ($values as $key => $value) {
            $this->$key = $value;
        }

        return $this;
    }
1144224
public function values()
    {
        $count       = $this->count()->toNative();
        $valuesArray = new \SplFixedArray($count);

        foreach ($this->items as $key => $item) {
            $valuesArray->offsetSet($key, $item->getValue());
        }

        return new Collection($valuesArray);
    }
1236782
private function setValues($values)
    {
        if (! empty($values)) {
            if ($this->canHaveMultipleValues()) {
                $this->addValues($values);
            } elseif ($this->canHaveValue()) {
                $this->addValue($values);
            }
        }

        return $this;
    }
756368
protected function _setJoins()
    {
        $joins = $this->_sql->getJoins();
        foreach ($joins as $join) {
            $this->_statement .= $this->_createJoinStatement($join);
        }
        return $this;
    }
102619
private function setQuery(array $query = [])
    {
        $defaults = [];
        if (!empty($this->getAccessToken())) {
            $defaults['access_token'] = $this->getAccessToken();
        }
        return ['query' => array_merge($defaults, $query)];
    }
821768
function setValue($values) {
        $values = (array)$values;
        foreach ($values as $name=>$value) {
            if (array_key_exists($name, $this->_values)) {
                $this->_values[$name] = $value;
            }
        }
    }
1374911
public function setQuery($query)
    {
        if (!($query instanceof QueryString)) {
            $this->query = new QueryString($query);

            return $this;
        }

        $this->query = $query;

        return $this;
    }
1260595
public function setQueryString(array $query): self
    {

        foreach ($query as $key => $value) {
            if (is_array($value)) {
                $query[$key] = implode(',', $value);
            }
        }

        $this->query_string = array_merge($this->query_string, $query);

        return $this;
    }
541487
public function setResults(array $values)
    {
        foreach ($values as $field => $value) {
            if (empty($value)) {
                continue;
            }
            $this->setResult($field, $value);
        }

        return $this;
    }
915171
public function values($values)
    {
        if(!$values instanceof KDatabaseQuerySelect)
        {
            if (!$this->columns && !is_numeric(key($values))) {
                $this->columns(array_keys($values));
            }

            $this->values[] = array_values($values);
        }
        else $this->values = $values;

        return $this;
    }
1123917
protected function setData()
    {
        // If it's already an array of arrays, we're good to go
        if (is_array(reset($this->data))) {
            return $this->setArrayOfArraysData();
        }

        $column_width = $this->getColumnWidth($this->data);
        $row_count    = $this->getMaxRows($column_width);

        return array_chunk($this->data, $row_count);
    }