public static function set(string $key, $value)
    {
        // Start session if needed
        if (! session_id()) {
            self::start();
        }

        // Set key
        $_SESSION[(string) $key] = $value;
    }
public static function set(string $key, $value)
    {
        // Start session if needed
        if (! session_id()) {
            self::start();
        }

        // Set key
        $_SESSION[(string) $key] = $value;
    }
public static function set ( string $ key , $ value ) { // Start session if needed if ( ! session_id ( ) ) { self :: start ( ) ; } // Set key $ _SESSION [ ( string ) $ key ] = $ value ; }
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.
Stores a variable in the session .