summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2014-03-10 17:15:19 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2014-03-10 17:15:19 +0100
commit9fe5033f1ec1737eae9402008c5228e5fe60f9bc (patch)
tree0898a1a979a511ef23643be614af0e4872c6e448 /lib
parent41f814515e2396e236eb7b59714cc27eccd230de (diff)
downloadnextcloud-server-9fe5033f1ec1737eae9402008c5228e5fe60f9bc.tar.gz
nextcloud-server-9fe5033f1ec1737eae9402008c5228e5fe60f9bc.zip
PHPDoc updated
Diffstat (limited to 'lib')
-rw-r--r--lib/private/session/memory.php5
-rw-r--r--lib/private/session/session.php10
2 files changed, 13 insertions, 2 deletions
diff --git a/lib/private/session/memory.php b/lib/private/session/memory.php
index 1562c2ce037..8434b6000e5 100644
--- a/lib/private/session/memory.php
+++ b/lib/private/session/memory.php
@@ -63,6 +63,11 @@ class Memory extends Session {
$this->data = array();
}
+ /**
+ * In case the session has already been locked an exception will be thrown
+ *
+ * @throws \Exception
+ */
private function validateSession() {
if ($this->sessionClosed) {
throw new \Exception('Session has been closed - no further changes to the session as allowed');
diff --git a/lib/private/session/session.php b/lib/private/session/session.php
index 5c18f3e495d..6f6c804f384 100644
--- a/lib/private/session/session.php
+++ b/lib/private/session/session.php
@@ -13,6 +13,11 @@ use OCP\ISession;
abstract class Session implements \ArrayAccess, ISession {
/**
+ * @var bool
+ */
+ protected $sessionClosed = false;
+
+ /**
* $name serves as a namespace for the session keys
*
* @param string $name
@@ -50,8 +55,9 @@ abstract class Session implements \ArrayAccess, ISession {
$this->remove($offset);
}
- protected $sessionClosed = false;
-
+ /**
+ * Close the session and release the lock
+ */
public function close() {
$this->sessionClosed = true;
}