protected function PdoProfilerStorage::exec

4 calls to PdoProfilerStorage::exec()
PdoProfilerStorage::cleanup in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php
PdoProfilerStorage::purge in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php
Purges all data from the database.
PdoProfilerStorage::write in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php
Saves a Profile.
SqliteProfilerStorage::exec in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php
1 method overrides PdoProfilerStorage::exec()
SqliteProfilerStorage::exec in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/SqliteProfilerStorage.php

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php, line 146

Class

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

Namespace

Symfony\Component\HttpKernel\Profiler

Code

protected function exec($db, $query, array $args = array()) {
  $stmt = $this
    ->prepareStatement($db, $query);
  foreach ($args as $arg => $val) {
    $stmt
      ->bindValue($arg, $val, is_int($val) ? \PDO::PARAM_INT : \PDO::PARAM_STR);
  }
  $success = $stmt
    ->execute();
  if (!$success) {
    throw new \RuntimeException(sprintf('Error executing query "%s"', $query));
  }
}