]> 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 994fcbe52ceb30cd4086369c46c89b9d66832260..4ae991684ac5ffff6b3fd259077caa3db513a23e 100644 (file)
@@ -202,4 +202,14 @@ class SessionManager
     {
         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;
+    }
 }