You are here

protected function PdoProfilerStorage::createProfileFromData in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php \Symfony\Component\HttpKernel\Profiler\PdoProfilerStorage::createProfileFromData()
2 calls to PdoProfilerStorage::createProfileFromData()
PdoProfilerStorage::read in vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php
Reads data associated with the given token.
PdoProfilerStorage::readChildren in vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php
Reads the child profiles for the given token.

File

vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php, line 200

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