public static function get($name, $options = [])
    {
        RequestSession::_start();

        $default = isset($options["default"]) ? $options["default"] : null;

        return isset($_SESSION[$name]) ? $_SESSION[$name] : $default;
    }
public static function get($name, $options = [])
    {
        RequestSession::_start();

        $default = isset($options["default"]) ? $options["default"] : null;

        return isset($_SESSION[$name]) ? $_SESSION[$name] : $default;
    }
public static function get ( $ name , $ options = [ ] ) { RequestSession :: _start ( ) ; $ default = isset ( $ options [ "default" ] ) ? $ options [ "default" ] : null ; return isset ( $ _SESSION [ $ name ] ) ? $ _SESSION [ $ name ] : $ default ; }
Gets a session variable.

Example:

$token = RequestSession::get("token");
$username = RequestSession::get("username", ["default" => "root"]);

@param string $name    Session variable name
@param array  $options Options

@return mixed|null
Gets a session variable .