diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-10 17:15:19 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-03-10 17:15:19 +0100 |
commit | 9fe5033f1ec1737eae9402008c5228e5fe60f9bc (patch) | |
tree | 0898a1a979a511ef23643be614af0e4872c6e448 /lib | |
parent | 41f814515e2396e236eb7b59714cc27eccd230de (diff) | |
download | nextcloud-server-9fe5033f1ec1737eae9402008c5228e5fe60f9bc.tar.gz nextcloud-server-9fe5033f1ec1737eae9402008c5228e5fe60f9bc.zip |
PHPDoc updated
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/session/memory.php | 5 | ||||
-rw-r--r-- | lib/private/session/session.php | 10 |
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; } |