public static function get($key = '', $secondkey = false)
    {
        $name = self::$prefix . $key;

        if (empty($key)) {
            return isset($_SESSION) ? $_SESSION : null;
        } elseif ($secondkey == true) {
            if (isset($_SESSION[$name][$secondkey])) {
                return $_SESSION[$name][$secondkey];
            }
        }

        return isset($_SESSION[$name]) ? $_SESSION[$name] : null;
    }
public static function get($key = '', $secondkey = false)
    {
        $name = self::$prefix . $key;

        if (empty($key)) {
            return isset($_SESSION) ? $_SESSION : null;
        } elseif ($secondkey == true) {
            if (isset($_SESSION[$name][$secondkey])) {
                return $_SESSION[$name][$secondkey];
            }
        }

        return isset($_SESSION[$name]) ? $_SESSION[$name] : null;
    }
public static function get ( $ key = '' , $ secondkey = false ) { $ name = self :: $ prefix . $ key ; if ( empty ( $ key ) ) { return isset ( $ _SESSION ) ? $ _SESSION : null ; } elseif ( $ secondkey == true ) { if ( isset ( $ _SESSION [ $ name ] [ $ secondkey ] ) ) { return $ _SESSION [ $ name ] [ $ secondkey ] ; } } return isset ( $ _SESSION [ $ name ] ) ? $ _SESSION [ $ name ] : null ; }
Get item from session.

@param string      $key       → item to look for in session
@param string|bool $secondkey → if used then use as a second key

@return mixed|null → key value, or null if key doesn't exists
Get item from session .