You are here

private function PdoSessionHandler::rollback in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php \Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler::rollback()

Helper method to rollback a transaction.

5 calls to PdoSessionHandler::rollback()
PdoSessionHandler::commit in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
Helper method to commit a transaction.
PdoSessionHandler::createTable in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
Creates the table to store sessions which can be called once for setup.
PdoSessionHandler::destroy in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
PdoSessionHandler::read in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
PdoSessionHandler::write in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php

File

vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php, line 476

Class

PdoSessionHandler
Session handler using a PDO connection to read and write data.

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Handler

Code

private function rollback() {

  // We only need to rollback if we are in a transaction. Otherwise the resulting
  // error would hide the real problem why rollback was called. We might not be
  // in a transaction when not using the transactional locking behavior or when
  // two callbacks (e.g. destroy and write) are invoked that both fail.
  if ($this->inTransaction) {
    if ('sqlite' === $this->driver) {
      $this->pdo
        ->exec('ROLLBACK');
    }
    else {
      $this->pdo
        ->rollBack();
    }
    $this->inTransaction = false;
  }
}