コード例 #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;
 }