You are here

protected function PdoProfilerStorage::prepareStatement in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php \Symfony\Component\HttpKernel\Profiler\PdoProfilerStorage::prepareStatement()
4 calls to PdoProfilerStorage::prepareStatement()
PdoProfilerStorage::exec in vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php
PdoProfilerStorage::fetch in vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php
SqliteProfilerStorage::exec in vendor/symfony/http-kernel/Profiler/SqliteProfilerStorage.php
SqliteProfilerStorage::fetch in vendor/symfony/http-kernel/Profiler/SqliteProfilerStorage.php

File

vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php, line 168

Class

PdoProfilerStorage
Base PDO storage for profiling information in a PDO database.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

protected function prepareStatement($db, $query) {
  try {
    $stmt = $db
      ->prepare($query);
  } catch (\Exception $e) {
    $stmt = false;
  }
  if (false === $stmt) {
    throw new \RuntimeException('The database cannot successfully prepare the statement');
  }
  return $stmt;
}