@param string $key
@param        $value

@throws SessionException
551111
public static function setOption(string $key, $value): void
    {
        static::validateOptions([$key => $value]);
        static::$options[$key] = $value;
    }
476035
public static function set(string $key, string $value): void
    {
        /* Check if initialized */
        if (!self::$initialized) {
            self::initialize();
        }

        /* Check if key exists */
        if (!self::$configs[$key]) {
            return;
        }

        /* Check if values are the same */
        if (self::$configs[$key] == $value) {
            return;
        }

        /* Write to current array */
        self::$configs[$key] = $value;

        /* Write to file */
        file_put_contents(self::$path, self::convertConfigsToFile());
    }
725665
public static function set($key, $value = false)
    {
        if (is_array($key) && $value == false) {
            foreach ($key as $name => $value) {
                $_SESSION[self::$prefix . $name] = $value;
            }
        } else {
            $_SESSION[self::$prefix . $key] = $value;
        }

        return true;
    }
1268867
public function with($key, $value)
    {
        $this->hasData = true;

        $this->session->create($key, $value);

        return $this;
    }
1121959
public function set(CacheKey $key, $value, /** @noinspection PhpUnusedParameterInspection */
                        $sessionLength = null) {

		$this->cache [$key->getModule()] [$key->getProperty()] = $value;

		return true;
	}
471813
public function set($key, $value=null)
    {
        $this->start();
        
        $_SESSION[$key] = $value;
        
        //session_write_close();
        
        $sdata = is_scalar($key) ? [$key => $value] : $key;
        \Wslim\Ioc::logger('session')->debug(sprintf('[%s]set %s:%s', static::getId(), $key, print_r($value, true)));
        
        return $this;
    }
722668
private function setPropValue(string $key, $value): void
    {
        $property = new ReflectionProperty(get_class($this), $key);
        $property->setAccessible(true);
        $property->setValue($this, $value);
    }
361177
private function sessionBinding($key)
    {
        if (null !== $this->sessionOptions[$key]) {
            if (!\array_key_exists($key, $_SESSION)) {
                $_SESSION[$key] = $this->sessionOptions[$key];
            }
            if ($this->sessionOptions[$key] !== $_SESSION[$key]) {
                throw new SessionException(\sprintf('session bound to %s, we got "%s", but expected "%s"', $key, $_SESSION[$key], $this->sessionOptions[$key]));
            }
        }
    }
669714
protected function setSessionData(string $key, ?string $value = null)
    {
        if (!$value) {
            unset($_SESSION['key']);
            return;
        }

        $_SESSION[$key] = $value;
    }
657560
public static function set_sticky($key, $value) {
		if (self::$sticky === null) {
			self::$sticky = new \Skeleton\Core\Web\Session\Sticky();
		}

		self::$sticky->$key = $value;
	}
525308
public function offsetSet($key, $value) {
        if(!$this->offsetExists($key)) {
            $this->table[$key] = new Value($value);
        } else {
            $this->table[$key]->setValue($value);
        }
    }
876202
public function setUserState($key, $value)
    {
        $session = JFactory::getSession();
        $registry = $session->get('registry');

        if (!is_null($registry))
        {
            return $registry->set($key, $value);
        }

        return null;
    }
831891
public function set(string $key, $value)
    {
        $key = $this->security->normalize($key);
        $value = $this->security->normalize($value);
        parent::set($key, $value); // TODO: Change the autogenerated stub
        $_SESSION[$key] = $value;
    }
193383
protected function setLocalSessionValue($key, $value) {
    $sessionVarname = get_class($this);
    $localValues = $this->session->get($sessionVarname, null);
    if ($localValues == null) {
      $localValues = [];
    }
    $localValues[$key] = $value;
    $this->session->set($sessionVarname, $localValues);
  }
659750
public function set($key, $value) {
		assert('is_string($key)');

		$session = SimpleSAML_Session::getSessionFromRequest();
		$session->setData('openid.session', $key, $value);
	}
908825
public function set(string $key, $value): void {
		if (!property_exists($this, $key)) {
			throw new EntityException(
				sprintf("Unknown property (%s) in %s.", $key, get_class()),
				EntityException::UNKNOWN_PROPERTY
			);
		}
		
		$this->{$key} = $value;
	}
942812
public static function hasKeyAndValue(string $key, $value): bool
    {
        static::startSessionIfNotHasStarted();

        return \array_key_exists($key, $_SESSION) && $_SESSION[$key] === $value;
    }