You are here

protected function FileProfilerStorage::createProfileFromData in Devel 8.3

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

File

webprofiler/src/Profiler/FileProfilerStorage.php, line 16

Class

FileProfilerStorage
Implements file profiler storage.

Namespace

Drupal\webprofiler\Profiler

Code

protected function createProfileFromData($token, $data, $parent = NULL) {
  $profile = new Profile($token);
  $profile
    ->setIp($data['ip']);
  $profile
    ->setMethod($data['method']);
  $profile
    ->setUrl($data['url']);
  $profile
    ->setTime($data['time']);
  $profile
    ->setCollectors($data['data']);
  $profile
    ->setStatusCode($data['status_code']);
  return $profile;
}