You are here

private function DatabaseProfilerStorage::createProfileFromData in Devel 8.3

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

Parameters

string $token:

$data:

Return value

\Symfony\Component\HttpKernel\Profiler\Profile

1 call to DatabaseProfilerStorage::createProfileFromData()
DatabaseProfilerStorage::read in webprofiler/src/Profiler/DatabaseProfilerStorage.php
Reads data associated with the given token.

File

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

Class

DatabaseProfilerStorage
Implements a profiler storage using the DBTNG query api.

Namespace

Drupal\webprofiler\Profiler

Code

private function createProfileFromData($token, $data) {
  $profile = new Profile($token);
  $profile
    ->setIp($data->ip);
  $profile
    ->setMethod($data->method);
  $profile
    ->setUrl($data->url);
  $profile
    ->setTime($data->time);
  $profile
    ->setCollectors(unserialize(base64_decode($data->data)));
  $profile
    ->setStatusCode($data->status_code);
  return $profile;
}