private function DatabaseProfilerStorage::createProfileFromData in Devel 8
Same name and namespace in other branches
- 8.3 webprofiler/src/Profiler/DatabaseProfilerStorage.php \Drupal\webprofiler\Profiler\DatabaseProfilerStorage::createProfileFromData()
- 8.2 webprofiler/src/Profiler/DatabaseProfilerStorage.php \Drupal\webprofiler\Profiler\DatabaseProfilerStorage::createProfileFromData()
- 4.x webprofiler/src/Profiler/DatabaseProfilerStorage.php \Drupal\webprofiler\Profiler\DatabaseProfilerStorage::createProfileFromData()
Parameters
string $token:
$data:
Return value
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 147
Class
- DatabaseProfilerStorage
- Implements a profiler storage using the DBTNG query api.
Namespace
Drupal\webprofiler\ProfilerCode
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;
}