Set the relations

@param   Relation[] $values The relations

@return  void
490202
protected function setRelations($values)
    {
        if (isset($values[0]->belongsTo)) {
            $this->relations['belongsTo'] = $values[0]->belongsTo;
        }

        if (isset($values[0]->belongsToMany)) {
            $this->relations['belongsToMany'] = $values[0]->belongsToMany;
        }

        if (isset($values[0]->hasOne)) {
            $this->relations['hasOne'] = $values[0]->hasOne;
        }

        if (isset($values[0]->hasMany)) {
            $this->relations['hasMany'] = $values[0]->hasMany;
        }

        if (isset($values[0]->hasManyThrough)) {
            $this->relations['hasManyThrough'] = $values[0]->hasManyThrough;
        }
    }
762088
public function addExtraKeys(array $values)
    {
        foreach ($values as $key => $value) {
            $this->setExtraKey($key, $value);
        }
    }
1210011
public function bindValues($values): void
    {
        $params = func_get_args();
        if (isset($params[0]) && is_array($params[0])) {
            $this->bindedValues = new \ArrayObject($params[0]);
        } else {
            $this->bindedValues = new \ArrayObject($params);
        }
    }
515147
public function setRelation($relation, $value)
    {
        $this->checkInitRelations();
        $this->relations[$relation] = $value;

        return $this;
    }
1308048
public function load($relations = [])
	{
		$this->addRelations($relations);
		
		$this->clearQueue();

		$this->queueUnresolvedObjects($this->data, $this->relations);

		$this->loadQueue();
	}
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];
    }
160794
public function initRelation(array $models, $relation)
    {
        foreach ($models as $model) {
            $model->setRelation($relation, $this->getDefaultFor($model));
        }

        return $models;
    }
819956
public function setValues($values)
    {
        if (!is_array($values)) {
            $values = preg_split('/,\s*/', $values);
        }
        $this->values = $values;

        return $this;
    }
323102
public function setValuesSafe(array $values = [])
    {
        $blacklist = is_array(static::$blacklist) ? static::$blacklist : [static::$primary_key];

        foreach ($values as $key => $value) {
            if (!in_array($key, $blacklist) && isset(self::$column_cache[get_called_class()][$key])) {
                $this->set($key, $values[$key]);
            }
        }
    }
299950
public static function setSettings( array $values )
	{
		foreach ($values as $name => $value)
			self::setSetting($name, $value);
	}
1244726
public function setValues(array $values)
    {
        foreach ($values as $name => $value) {
            if ($element = $this->get($name)) {
                $element->setValue($value);
            }
        }
        return $this;
    }
330015
public function setHeaders(array $values)
    {
        foreach ($values as $key => $value) {
            $this->setHeader($key, $value);
        }
    }
626408
public function setValuesAttribute(array $values = [])
    {
        static::saved(function ($model) use ($values) {
            $savedIds = [];
            foreach ($values as $data) {
                if (empty(array_filter($data))) {
                    continue;
                }
                // Create option or enable it if exists
                $value = $this->values()->updateOrCreate([
                    'code' => $data['code'],
                ], $data);
                $savedIds[] = $value->id;
            }
            $this->values()->whereNotIn('id', $savedIds)->delete();
        });
    }
1085203
public function setValues(array $values = array())
    {
        foreach ($values as $k => $v) {
            $this->set($k, $v);
        }

        return $this;
    }
747898
public function set($values, $kwargs = [])
    {
        if (!$this->through->getMeta()->autoCreated) {
            throw new AttributeError(
                sprintf(
                    "Cannot set values on a ManyToManyField which specifies an intermediary model. 
                Use %s's Manager instead.",
                    $this->through->getMeta()->getModelName()
                )
            );
        }

        $clear = ArrayHelper::getValue($kwargs, 'clear', false);

        if ($clear) {
            $this->clear();
            $this->addItems($this->fromFieldName, $this->toFieldName, $values);
        } else {
            $oldIds = $this->asArray([$this->toField->getRelatedField()->getAttrName()], true, true)
                ->getResults();

            $newObjects = [];
            foreach ($values as $value) {
                if ($value instanceof Model) {
                    $fkVal = $this->toField->getForeignRelatedFieldsValues($value)[0];
                } else {
                    $fkVal = $value;
                }

                if (in_array($fkVal, $oldIds)) {
                    unset($oldIds[array_search($fkVal, $oldIds)]);
                } else {
                    $newObjects[] = $value;
                }
            }

            $this->remove(...$oldIds);
            $this->add(...$newObjects);
        }
    }
611172
public function setRelations($relations)
    {
        $this->setAvailableIncludes(array_unique(array_merge($this->availableIncludes, (array) $relations)));

        return $this;
    }
1243862
private function bindValues(array $values)
    {
        $this->bindedParameters = array();
        $this->bindedTypes = array();
        $this->bindedValues = array();

        foreach ($values as $parameter => $value) {
            if (is_int($parameter)) {
                $parameter++;
            }

            $this->bindValue($parameter, $value);
        }
    }