]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/security/SessionManager.php
Process tag cloud page through Slim controller
[github/shaarli/Shaarli.git] / application / security / SessionManager.php
index b8b8ab8d18ccad003f897c78072b12e94d410b22..4ae991684ac5ffff6b3fd259077caa3db513a23e 100644 (file)
@@ -196,4 +196,20 @@ class SessionManager
         }
         return true;
     }
+
+    /** @return array Local reference to the global $_SESSION array */
+    public function getSession(): array
+    {
+        return $this->session;
+    }
+
+    /**
+     * @param mixed $default value which will be returned if the $key is undefined
+     *
+     * @return mixed Content stored in session
+     */
+    public function getSessionParameter(string $key, $default = null)
+    {
+        return $this->session[$key] ?? $default;
+    }
 }