Skip to content
Snippets Groups Projects
Commit 9fe5033f authored by Thomas Müller's avatar Thomas Müller
Browse files

PHPDoc updated

parent 41f81451
Branches
No related tags found
No related merge requests found
......@@ -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');
......
......@@ -12,6 +12,11 @@ use OCP\ISession;
abstract class Session implements \ArrayAccess, ISession {
/**
* @var bool
*/
protected $sessionClosed = false;
/**
* $name serves as a namespace for the session keys
*
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment