function DatabaseProfilerStorage::createProfileFromData

Parameters

string $token:

$data:

Return value

Profile

1 call to DatabaseProfilerStorage::createProfileFromData()
DatabaseProfilerStorage::read in webprofiler/src/Profiler/DatabaseProfilerStorage.php

File

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

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;
}