Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
Archivo: State.php Proyecto: 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;
 }