protected function PdoProfilerStorage::createProfileFromData

2 calls to PdoProfilerStorage::createProfileFromData()
PdoProfilerStorage::read in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php
Reads data associated with the given token.
PdoProfilerStorage::readChildren in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php
Reads the child profiles for the given token.

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/PdoProfilerStorage.php, line 201

Class

PdoProfilerStorage
Base PDO storage for profiling information in a PDO database.

Namespace

Symfony\Component\HttpKernel\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(unserialize(base64_decode($data['data'])));
  if (!$parent && !empty($data['parent'])) {
    $parent = $this
      ->read($data['parent']);
  }
  if ($parent) {
    $profile
      ->setParent($parent);
  }
  $profile
    ->setChildren($this
    ->readChildren($token, $profile));
  return $profile;
}