public function commit() { if ($this->_active && $this->_connection->getActive()) { $this->_connection->getPdoInstance()->commit(); $this->_active = false; } else { throw new TDbException('dbtransaction_transaction_inactive'); } }