Ejemplo n.º 1
0
 function __destruct()
 {
     if ($this->db->inTransaction() && is_resource($this->db->getLink())) {
         $this->closeCursor();
         $this->closeTransaction();
     }
 }
Ejemplo n.º 2
0
 private function beginTransaction(IsolationLevel $level = null, AccessMode $mode = null)
 {
     $this->assertFinished();
     if (!$this->db->inTransaction()) {
         $this->db->begin($level, $mode);
     } else {
         $this->savepointName = $this->createSavepointName();
         $this->db->savepointBegin($this->savepointName);
     }
 }