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

Breadcrumb

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

function PdoSessionHandler::getConnection

Return a PDO instance.

1 call to PdoSessionHandler::getConnection()
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.

File

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

Class

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

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Handler

Code

protected function getConnection() : \PDO {
    if (!isset($this->pdo)) {
        $this->connect($this->dsn ?: \ini_get('session.save_path'));
    }
    return $this->pdo;
}

API Navigation

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