]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/Session/Capability/IHandleSessions.php
Merge pull request #12021 from nupplaphil/feat/session_util
[friendica.git] / src / Core / Session / Capability / IHandleSessions.php
index 7b863b76f54b6a9e31cb5adc18e0d7c130a34091..d0b649845b5c4c050c8bcdb52ab6fe283b4d3351 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2021, the Friendica project
+ * @copyright Copyright (C) 2010-2022, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -54,6 +54,16 @@ interface IHandleSessions
         */
        public function get(string $name, $defaults = null);
 
+       /**
+        * Retrieves a value from the provided key if it exists and removes it from session
+        *
+        * @param string $name
+        * @param mixed  $defaults
+        *
+        * @return mixed
+        */
+       public function pop(string $name, $defaults = null);
+
        /**
         * Sets a single session variable.
         * Overrides value of existing key.