/** * Rollback changes in a transaction. * @param string optional savepoint name * @return void */ public function rollback($savepoint = NULL) { $this->connected || $this->connect(); if ($this->profiler !== NULL) { $ticket = $this->profiler->before($this, IDibiProfiler::ROLLBACK, $savepoint); } $this->driver->rollback($savepoint); if (isset($ticket)) { $this->profiler->after($ticket); } }
/** * Rollback changes in a transaction. * @param string optional savepoint name * @return void */ public function rollback($savepoint = NULL) { $this->connected || $this->connect(); $event = $this->onEvent ? new DibiEvent($this, DibiEvent::ROLLBACK, $savepoint) : NULL; try { $this->driver->rollback($savepoint); $event && $this->onEvent($event->done()); } catch (DibiException $e) { $event && $this->onEvent($event->done($e)); throw $e; } }