You are here

public function DatabaseProfilerStorage::read in Devel 8

Same name and namespace in other branches
  1. 8.3 webprofiler/src/Profiler/DatabaseProfilerStorage.php \Drupal\webprofiler\Profiler\DatabaseProfilerStorage::read()
  2. 8.2 webprofiler/src/Profiler/DatabaseProfilerStorage.php \Drupal\webprofiler\Profiler\DatabaseProfilerStorage::read()
  3. 4.x webprofiler/src/Profiler/DatabaseProfilerStorage.php \Drupal\webprofiler\Profiler\DatabaseProfilerStorage::read()

File

webprofiler/src/Profiler/DatabaseProfilerStorage.php, line 83

Class

DatabaseProfilerStorage
Implements a profiler storage using the DBTNG query api.

Namespace

Drupal\webprofiler\Profiler

Code

public function read($token) {
  $record = $this->database
    ->select('webprofiler', 'w')
    ->fields('w')
    ->condition('token', $token)
    ->execute()
    ->fetch();
  if (isset($record->data)) {
    return $this
      ->createProfileFromData($token, $record);
  }
}