summaryrefslogtreecommitdiffstats
path: root/lib/private/Session/Memory.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Session/Memory.php')
-rw-r--r--lib/private/Session/Memory.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/private/Session/Memory.php b/lib/private/Session/Memory.php
index 777458a9aa5..bcb1f1d950c 100644
--- a/lib/private/Session/Memory.php
+++ b/lib/private/Session/Memory.php
@@ -26,6 +26,9 @@
namespace OC\Session;
+use Exception;
+use OCP\Session\Exceptions\SessionNotAvailableException;
+
/**
* Class Internal
*
@@ -89,6 +92,17 @@ class Memory extends Session {
public function regenerateId($deleteOldSession = true) {}
/**
+ * Wrapper around session_id
+ *
+ * @return string
+ * @throws SessionNotAvailableException
+ * @since 9.1.0
+ */
+ public function getId() {
+ throw new SessionNotAvailableException('Memory session does not have an ID');
+ }
+
+ /**
* Helper function for PHPUnit execution - don't use in non-test code
*/
public function reopen() {
@@ -98,11 +112,11 @@ class Memory extends Session {
/**
* In case the session has already been locked an exception will be thrown
*
- * @throws \Exception
+ * @throws Exception
*/
private function validateSession() {
if ($this->sessionClosed) {
- throw new \Exception('Session has been closed - no further changes to the session are allowed');
+ throw new Exception('Session has been closed - no further changes to the session are allowed');
}
}
}