Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PdoSessionHandler.php

function PdoSessionHandler::rollback

Helper method to rollback a transaction.

7 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::doDestroy in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
PdoSessionHandler::doRead in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php
Reads the session data in respect to the different locking strategies.
PdoSessionHandler::doWrite in vendor/symfony/http-foundation/Session/Storage/Handler/PdoSessionHandler.php

... See full list

File

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

Class

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

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Handler

Code

private function rollback() : void {
    // 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;
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal