/** @return void */ public function rollback() { if (self::$transactionCounter[$dsn = $this->getDsnKey()] !== 0) { $this->connection->rollBack(); } self::$transactionCounter[$dsn] = 0; }
/** * Rollback to savepoint. * * @return void * @throws InvalidTransactionException */ public function rollback() { if (self::$level === 0) { throw new InvalidTransactionException('No transaction started'); } self::$level--; if (self::$level === 0 || !$this->isSupported()) { $this->connection->rollBack(); } else { $this->connection->getPdo()->exec('ROLLBACK TO SAVEPOINT LEVEL' . self::$level); } }
/** @return void */ public function rollBack() { $this->connection->rollBack(); }