protected function PdoProfilerStorage::has

Returns whether data for the given token already exists in storage.

Parameters

string $token The profile token:

Return value

Boolean

1 call to PdoProfilerStorage::has()
PdoProfilerStorage::write in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php
Saves a Profile.

File

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

Class

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

Namespace

Symfony\Component\HttpKernel\Profiler

Code

protected function has($token) {
  $db = $this
    ->initDb();
  $tokenExists = $this
    ->fetch($db, 'SELECT 1 FROM sf_profiler_data WHERE token = :token LIMIT 1', array(
    ':token' => $token,
  ));
  $this
    ->close($db);
  return !empty($tokenExists);
}