PHPDoc updated
This commit is contained in:
parent
41f814515e
commit
9fe5033f1e
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue