Update config for a specified class.
@param string $className
@param $values
@return $this
965041
public function set($className, $values) {
        if (!isset($this->options[$className])) {
            $this->options[$className] = array();
        }
        foreach ($values as $k => $v) {
            $this->options[$className][$k] = $v;

        }
        return $this;
    }
593277
public function update_user($values, $username = null)
	{
		$username = $username ?: $this->user['username'];
		$current_values = \DB::select_array(\Config::get('simpleauth.table_columns', array('*')))
			->where('username', '=', $username)
			->from(\Config::get('simpleauth.table_name'))
			->execute(\Config::get('simpleauth.db_connection'));

		if (empty($current_values))
		{
			throw new \SimpleUserUpdateException('Username not found', 4);
		}

		$update = array();
		if (array_key_exists('username', $values))
		{
			throw new \SimpleUserUpdateException('Username cannot be changed.', 5);
		}
		if (array_key_exists('password', $values))
		{
			if (empty($values['old_password'])
				or $current_values->get('password') != $this->hash_password(trim($values['old_password'])))
			{
				throw new \SimpleUserWrongPassword('Old password is invalid');
			}

			$password = trim(strval($values['password']));
			if ($password === '')
			{
				throw new \SimpleUserUpdateException('Password can\'t be empty.', 6);
			}
			$update['password'] = $this->hash_password($password);
			unset($values['password']);
		}
		if (array_key_exists('old_password', $values))
		{
			unset($values['old_password']);
		}
		if (array_key_exists('email', $values))
		{
			$email = filter_var(trim($values['email']), FILTER_VALIDATE_EMAIL);
			if ( ! $email)
			{
				throw new \SimpleUserUpdateException('Email address is not valid', 7);
			}
			$matches = \DB::select()
				->where('email', '=', $email)
				->where('id', '!=', $current_values[0]['id'])
				->from(\Config::get('simpleauth.table_name'))
				->execute(\Config::get('simpleauth.db_connection'));
			if (count($matches))
			{
				throw new \SimpleUserUpdateException('Email address is already in use', 11);
			}
			$update['email'] = $email;
			unset($values['email']);
		}
		if (array_key_exists('group', $values))
		{
			if (is_numeric($values['group']))
			{
				$update['group'] = (int) $values['group'];
			}
			unset($values['group']);
		}
		if ( ! empty($values))
		{
			$profile_fields = @unserialize($current_values->get('profile_fields')) ?: array();
			foreach ($values as $key => $val)
			{
				if ($val === null)
				{
					unset($profile_fields[$key]);
				}
				else
				{
					$profile_fields[$key] = $val;
				}
			}
			$update['profile_fields'] = serialize($profile_fields);
		}

		$update['updated_at'] = \Date::forge()->get_timestamp();

		$affected_rows = \DB::update(\Config::get('simpleauth.table_name'))
			->set($update)
			->where('username', '=', $username)
			->execute(\Config::get('simpleauth.db_connection'));

		// Refresh user
		if ($this->user['username'] == $username)
		{
			$this->user = \DB::select_array(\Config::get('simpleauth.table_columns', array('*')))
				->where('username', '=', $username)
				->from(\Config::get('simpleauth.table_name'))
				->execute(\Config::get('simpleauth.db_connection'))->current();
		}

		return $affected_rows > 0;
	}
408879
public function setClass($className)
    {
        $this->attributes->removeAttributeClass($this->iconPrefixClass . '-*');
        $this->attributes->addAttributeClass($this->iconPrefixClass . '-' . $className);

        return $this;
    }
767412
public function setConfig($key, $value = null)
	{
		\Arr::set($this->config, $key, $value);

		return $this;
	}
1070273
public function forceUpdate(array $values)
    {
        $dao = $this->getEntityDao();

        $dao->setValues($values);

        $dao->update();

        return $this;
    }
1112088
public function setMainConfigClassName($className)
    {
        if (!class_exists($className)) {
            throw new \Parable\Framework\Exception("Main Config class '{$className}' does not exist.");
        }
        $this->mainConfigClass = $className;
        return $this;
    }
1090215
final public function setData(array $values): Model
    {
        if (!is_array($this->data)) {
            $this->data = $values;
        } else {
            $this->data = array_merge($this->data, $values);
        }

        return $this;
    }
127873
public function set_config($key, $value)
	{
		\Arr::set($this->config, $key, $value);

		return $this;
	}
1237570
public function update(array $values)
    {
        if (!$this->hasId()) {
            throw new UpdateException('ID not set - did you call find($id) before update($values)?');
        }

        if (!$this->isUpdatable()) {
            throw new UpdateException('Permission denied: Entity can not be updated');
        }

        $this->transactional(function () use ($values) {
            $this->forceUpdate($values);
        });

        return $this;
    }
243125
public function setValues(array $values)
    {
        $this->values = array();
        foreach ($values as $value) {
            $this->addValue($value);
        }
        return $this;
    }
1163228
public function set_config($key, $value) {
        if ($this->config === null) {
            $this->config = (object) array();
        }
        $this->config->$key = $value;
        $this->dirty = true;

        return $this;
    }
1242198
public final function set(string $className, $value): CacheInterface
   {
       $this->service[$className] = $value;
       return $this;
   }
460105
public function values($values) {
		if (is_array($values))
			$this->value = $values;
		else
			$this->valueList = func_get_args();
		return $this;
	}
429328
public function updateClassNames(&$classes)
    {
        if (!$this->apply()) {
            return;
        }
        
        $classes[] = $this->style('button');
        
        if ($class = $this->owner->ButtonTypeClass) {
            $classes[] = $class;
        }
        
        if ($class = $this->owner->ButtonSizeClass) {
            $classes[] = $class;
        }
    }
498820
public function setClassName($className)
    {
        Assert::stringNotEmpty($className, 'The class name must be a non-empty string. Got: %s');

        $pos = strrpos($className, '\\');

        if (false === $pos) {
            $this->namespaceName = '';
            $this->shortClassName = $className;
        } else {
            $this->namespaceName = substr($className, 0, $pos);
            $this->shortClassName = substr($className, $pos + 1);
        }

        return $this;
    }
1371570
public function addClass($className)
  {
    if (!is_numeric(array_search($className, $this->classes))) {
      $this->classes[] = $className;
      return true;
    }
    return false;
  }
728727
public function update($newValues)
    {
        foreach ($newValues as $key => $value) {
            $this->offsetSet($key, $value);
        }

        return $this;
    }