示例#1
0
文件: Session.php 项目: jivoo/jivoo
 /**
  * Close, save (if mutable), and unlock state data.
  * @throws NotOpenException If the state has already been closed.
  */
 public function close()
 {
     if ($this->updated and $this->store->isMutable()) {
         $this->store->write($this->data);
     }
     $this->store->close();
     $this->updated = false;
 }
示例#2
0
文件: State.php 项目: jivoo/core
 /**
  * Close, save (if mutable), and unlock state data.
  *
  * @throws NotOpenException If the state has already been closed.
  */
 public function close()
 {
     if (!isset($this->store)) {
         throw new NotOpenException('State already closed.');
     }
     if ($this->updated and $this->store->isMutable()) {
         $this->store->write($this->data);
     }
     $this->store->close();
     $this->store = null;
     $this->updated = false;
 }