Stores a variable in the session.

Session::set('user', 'Awilum');

@param string $key   The key for the variable.
@param mixed  $value The value to store.
168880
public static function set(string $key, $value)
    {
        // Start session if needed
        if (! session_id()) {
            self::start();
        }

        // Set key
        $_SESSION[(string) $key] = $value;
    }
905007
private function setValue($key, $value)
    {
        $this->$key = $value;

        if ($key == 'expires_in') $this->setExpiration($value);
    }
1190048
public function set($key, $value = null)
    {
        if (!$this->id) {
            throw new Exception('Cannot use set without active session.');
        }
        if (is_array($key)) {
            foreach ($key as $k => $value) {
                $this->data[$k] = $value;
            }
        } else {
            $this->data[$key] = $value;
        }
        return true;
    }
298058
public function put($key, $value = null)
    {
        if (!is_array($key)) {
            $key = [$key => $value];
        }

        foreach ($key as $arrayKey => $arrayValue) {
            Arr::set($_SESSION, $arrayKey, $arrayValue);
        }
    }
269092
public function write($key, $value)
    {
        if($this->_use_PHP_session) {
            $_SESSION[$key] = $value;
        } else if($this->_use_cache_facade) {
            //Write the VALUE to CACHE
        }

        return true;
    }
599155
public function set(string $key, $value)
    {
        if (!isset($this->data[$this->activeAssetSourceIdentifier])) {
            $this->initializeData($this->activeAssetSourceIdentifier);
        }
        $this->data[$this->activeAssetSourceIdentifier][$key] = $value;
    }
1239577
public function set($key, $value)
    {
        parent::set($key, $value);

        if ($key == "ACCESS_TOKEN") { 
            $user = $this->getUserId($value);
            parent::set('USER_ID', $user['id']);
        }
        
        if (parent::get('CLIENT_ID') != "" && parent::get('CLIENT_SECRET') != "" && empty(parent::get('ACCESS_TOKEN'))) {
            
            $response = $this->getToken();

            if (isset($response['access_token'])) {
                parent::set('ACCESS_TOKEN', $response['access_token']);
            

                $user = $this->getUserId($response['access_token']);

                if (isset($user['id'])) {
                    parent::set('USER_ID', $user['id']);
                }

            }
            
        }
    }
1308238
public function set($key, $value)
        {
            $this->session->put($key, $value);
            $this->session->push($this->key_name.'.new', $key);
            $this->removeFromOldFlashData([$key]);
        }
669714
protected function setSessionData(string $key, ?string $value = null)
    {
        if (!$value) {
            unset($_SESSION['key']);
            return;
        }

        $_SESSION[$key] = $value;
    }
788559
public function updateAttr($key, $value)
    {
        if (isset($_SESSION[$key])) {
            $_SESSION[$key] = $value;
            return true;
        } else {
            return false;
        }
    }
227022
public function set($key, $value)
    {
        $this->checkForNonEmptyKey($key);

        $this->getBackEndUser()->uc[self::PHPUNIT_SETTINGS_KEY][$key] = $value;
        $this->getBackEndUser()->writeUC();
    }
214017
public static function set($key, $value) {
        if (!isset(self::$config['settings'])) {
            self::$config['settings'] = array();
        }

        self::$config['settings'][$key] = $value;
    }
511721
public function setValue($key, $value)
    {
        $this->langstrings[$key] = $value;
        $this->debug('SetValue ' . $key . ' => ' . $value);
    }
252432
final public static function set($key, $value)
	{
		self::_checkInstance();
		self::$_instance->offsetSet($key, $value);
	}
725731
public static function set($key, $value = false)
    {

        /**
         * Check whether session is set in array or not
         * If array then set all session key-values in foreach loop
         */

        self::setPrefix();

        if (is_array($key) && $value === false) {

            foreach ($key as $name => $value) {
                $_SESSION[self::$_sessionPrefix . $name] = $value;
            }

        } else {
            $_SESSION[self::$_sessionPrefix . $key] = $value;
        }

    }
1357525
public function set($key, $value) {
		if (null === $key) {
			$this->_data[] = $value;
		} else {
			$this->_data[$key] = $value;
		}
	}
30317
public function set($key,$value)
    {
        $file=$this->getCacheDir().$key;
        file_put_contents($file, serialize($value));
    }