PHPDoc updated

This commit is contained in:
Thomas Müller 2014-03-10 17:15:19 +01:00
parent 41f814515e
commit 9fe5033f1e
2 changed files with 13 additions and 2 deletions

View File

@ -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');

View File

@ -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;
}