public function get($name, $default = null, $namespace = null)
    {
        // Get SESSION Namespace
        $namespace = $this->getNamespace($namespace);

        // Get session container
        $container = $_SESSION;
        if (!empty($namespace)) {
            if (!isset($_SESSION[$namespace])) {
                $_SESSION[$namespace] = [];
            }
            $container = $_SESSION[$namespace];
        }

        // Check and get session container value
        if (isset($container[$name])) {
            return $container[$name];
        }

        return $default;
    }
public function get($name, $default = null, $namespace = null)
    {
        // Get SESSION Namespace
        $namespace = $this->getNamespace($namespace);

        // Get session container
        $container = $_SESSION;
        if (!empty($namespace)) {
            if (!isset($_SESSION[$namespace])) {
                $_SESSION[$namespace] = [];
            }
            $container = $_SESSION[$namespace];
        }

        // Check and get session container value
        if (isset($container[$name])) {
            return $container[$name];
        }

        return $default;
    }
public function get ( $ name , $ default = null , $ namespace = null ) { // Get SESSION Namespace $ namespace = $ this -> getNamespace ( $ namespace ) ; // Get session container $ container = $ _SESSION ; if ( ! empty ( $ namespace ) ) { if ( ! isset ( $ _SESSION [ $ namespace ] ) ) { $ _SESSION [ $ namespace ] = [ ] ; } $ container = $ _SESSION [ $ namespace ] ; } // Check and get session container value if ( isset ( $ container [ $ name ] ) ) { return $ container [ $ name ] ; } return $ default ; }
Get a session variable value.

@param string $name      The name of the variable.
@param string $default   The value that will be returned if the variable doesn't exist.
@param string $namespace The namespace of the session variable.

@return string|null
Get a session variable value .