Overtrue\Socialite\Config::set PHP Метод

set() публичный Метод

Set an array item to a given value using "dot" notation.
public set ( string $key, mixed $value ) : array
$key string
$value mixed
Результат array
    public function set($key, $value)
    {
        if (is_null($key)) {
            throw new InvalidArgumentException('Invalid config key.');
        }
        $keys = explode('.', $key);
        while (count($keys) > 1) {
            $key = array_shift($keys);
            if (!isset($this->config[$key]) || !is_array($this->config[$key])) {
                $this->config[$key] = [];
            }
            $this->config =& $this->config[$key];
        }
        $this->config[array_shift($keys)] = $value;
        return $this->config;
    }