Sets values of validated data.

@param array       $values
@param string|null $group

@return self
358999
public function setValues(array $values, string $group = null): self
    {
        foreach ($values as $key => $value) {
            $this->setValue($key, $value, $group);
        }

        return $this;
    }
628685
public function set($name, $value = null): self
    {
        if (!is_array($name)) {
            $name = [$name => $value];
        }

        foreach ($name as $property => $value) {
            $this->_data[$property] = $value;
        }

        return $this;
    }
1264493
public function static_create(array $values=[], $groups=[]) {
		return $this->getDataMapper()->create($this->entityClass, $values, $groups);
	}
458204
public function values(array $values = [])
    {
        $values = array_combine(array_map([$this, 'trimName'], array_keys($values)), array_values($values));
        $this->values = $values;
        return $this;
    }
1134170
function setValues($values)
    {
        if (empty($values)) {
            // give it default checkbox behavior
            $this->_values = array('', 1);
        } elseif (is_scalar($values)) {
            // if it's string, then assume the value to
            // be passed is for when the element is checked
            $this->_values = array('', $values);
        } else {
            $this->_values = $values;
        }
        $this->updateAttributes(array('value' => $this->_values[1]));
        $this->setChecked($this->_currentValue == $this->_values[1]);
    }
721564
public function fromArray(array $values)
    {
        foreach ($values as $property => $value) {
            $this->__set($property, $value);
        }
        
        return $this;
    }
571303
public function set( $key, $value = null, $group = '' )
	{
		$this->checkLoaded();
		$this->modified = true;

		if ( is_array($key) ) {
			foreach ( $key as $k => $v ) {
				SettingsUtilities::set($this->storage, $k, $v);
			}
		} else {
			SettingsUtilities::set($this->storage, $key, $value);
		}
	}
303875
public function setValues(array $data): self
    {
        if (isset($data['values']) && !empty($data['values'])) {
            foreach ($data['values'] as $value) {
                $this->values[] = Value::create($value['value'], $value['end_time']);
            }
        }

        return $this;
    }
596098
public function setMultiple(array $values)
    {
        foreach ($values as $column => $value) {
            $this->set($column, $value);
        }

        return $this;
    }
195336
public function set(array $values) {
        $fieldMeta= $this->xpdo->getFieldMeta($this->_class);
        $fieldAliases= $this->xpdo->getFieldAliases($this->_class);
        foreach ($values as $key => $value) {
            $type= null;
            if (!array_key_exists($key, $fieldMeta)) {
                if (array_key_exists($key, $fieldAliases)) {
                    $key = $fieldAliases[$key];
                } else {
                    continue;
                }
            }
            if (array_key_exists($key, $fieldMeta)) {
                if ($value === null) {
                    $type= \PDO::PARAM_NULL;
                }
                elseif (!in_array($fieldMeta[$key]['phptype'], $this->_quotable)) {
                    $type= \PDO::PARAM_INT;
                }
                elseif (strpos($value, '(') === false && !$this->isConditionalClause($value)) {
                    $type= \PDO::PARAM_STR;
                }
                $this->query['set'][$key]= array('value' => $value, 'type' => $type);
            }
        }
        return $this;
    }
374378
public function setValues($values=array()) {
		$count=$this->count();
		$isArray=true;
		if (\is_array($values) === false) {
			$values=\array_fill(0, $count, $values);
			$isArray=false;
		}
		if (JArray::dimension($values) == 1 && $isArray)
			$values=[ $values ];

		$count=\min(\sizeof($values), $count);

		for($i=0; $i < $count; $i++) {
			$row=$this->content[$i];
			$row->setValues($values[$i]);
		}
		return $this;
	}
140292
public function set($data, $value = null)
    {
        //argument 1 must be an array or string
        Argument::i()->test(1, 'array', 'string');

        if (is_array($data)) {
            $this->data = $data;
            return $this;
        }

        $this->data[$data] = $value;

        return $this;
    }
1315997
public function set(array $values)
    {
        $this->decoded = array_merge($this->decoded, $values);

        $this->value = json_encode($this->decoded);

        return $this;
    }
1318741
public function setWritableValues(array $values)
    {
        foreach ($values as $key => $value) {
            if ($this->isWritable($key)) {
                $this->$key = $value;
            }
        }

        return $this;
    }
215881
public function setValues($values)
    {
        foreach ($this->findScenario() as $name) {
            if (array_key_exists($name, $values)) {
                $this->$name = $values[$name];
            }
        }
        return $this;
    }
660744
public function setValues($values=array()) {
		$count=$this->count();
		if (\is_array($values) === false) {
			$values=\array_fill(0, $count, $values);
		} else {
			if (JArray::isAssociative($values) === true) {
				$values=\array_values($values);
			}
		}
		$count=\min(\sizeof($values), $count);
		
		for($i=0; $i < $count; $i++) {
			$cell=$this->content[$i];
			$cell->setValue($values[$i]);
		}
	}
266017
public function setGroups($groups)
    {
        foreach ($groups as $key => $dtoData) {
            $this->groups[$key] = new GroupDto($dtoData);
        }
    
        return $this;
    }