Flash an item to the session.

@param $key
@param $value
421851
public function flash($key, $value)
    {
        return $this->session->flash($this->getSessionKey($key), $value);
    }
835214
public static function flash($key, $string = null)
    {
        if ((self::exists($key))) {
            $session = self::get($key);
            self::delete($key);
            return $session;
        }

        return false;
    }
88566
public function set($key, $value)
    {
        $this->initialize();

        $ids = explode('.', $key);
        $base = &$this->data;

        while ($current = array_shift($ids)) {
            if (is_array($base) && array_key_exists($current, $base)) {
                $base = &$base[$current];
            } else {
                $base[$current] = [];
                $base = &$base[$current];
            }
        }

        $base = $value;
        $this->session->set($this->name, $this->data);
    }
846924
protected function putSession($key, $value)
    {
        $sessionId = $this->makeSessionId();

        $currentStore = $this->getSession();

        $currentStore[$key] = $value;

        Session::put($sessionId, base64_encode(serialize($currentStore)));
    }
544002
private static function sendHeader($key, $value) {
    if (isset(self::$send_header)) {
      call_user_func(self::$send_header, $key, $value);
    } else {
      header(sprintf("%s: %s", $key, $value));
    }
  }
1268867
public function with($key, $value)
    {
        $this->hasData = true;

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

        return $this;
    }
885533
public function forever( $key, $value )
	{
		$this->store->forever( $this->itemKey( $key ), $value );

		$this->fireCacheEvent( 'write', [$key, $value, 0] );
	}
1205776
public function forever($key, $value)
    {
        $this->store->forever($this->itemKey($key), $value);

        $this->event(new KeyWritten($key, $value, 0));
    }
737815
public function pass($key, $value)
    {
        if (!isset($this->_session))
            throw new \Exception('m\Http\Response: No session object available to flash "'.$key.'" to.');

        $this->_session->flash($key, $value);

        return $this;
    }
430380
public static function set(string $key, $value) : void
    {
        $_SESSION[Notification::SESSION_KEY][$key] = $value;
    }
641978
protected function setSessionData($key, $value)
    {
        if (!isset($value)) {
            unset($_SESSION[$key]);
            return;
        }

        $_SESSION[$key] = $value;
    }
945844
public function flash( $key, $value )
	{
		$this->put( $key, $value );

		$this->push( 'flash.new', $key );

		$this->removeFromOldFlashData( [$key] );
	}
649926
public function session($key = '', $value = '')
    {
        $this->sessionStart();

        if (is_null($key)) {
            if (empty($_SESSION)) {
                return null;
            }

            unset($_SESSION);
        } elseif ('' === $key) {
            // Get All Session
            return $_SESSION;
        }

        if ('' === $value) {
            return isset($_SESSION[$key]) ? $_SESSION[$key] : null;
        } else {
            if (is_null($value)) {
                unset($_SESSION[$key]);
            } else {
                $_SESSION[$key] = $value;
            }
        }

        return null;
    }
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;
    }
254504
public function flash(string $key, $value = true)
    {
        $this->put($key, $value);

        $this->push('_flash.new', $key);

        $this->removeFromOldFlashData([$key]);
    }
906786
public function set($key, $value) {
		$this->loadIfNeeded();

		$this->array[$key] = $value;

		$this->saver->save($this->fileName, $this->array, $this->fileMap);
	}
1142567
public function setFlash(string $key, $value): SessionInterface
    {
        $key = $this->flashKey($key);

        return $this->set($key, $value);
    }