protected function MongoDbProfilerStorage::createProfileFromData

Parameters

array $data:

Return value

Profile

1 call to MongoDbProfilerStorage::createProfileFromData()
MongoDbProfilerStorage::read in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Profiler/MongoDbProfilerStorage.php
Reads data associated with the given token.

File

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

Class

MongoDbProfilerStorage

Namespace

Symfony\Component\HttpKernel\Profiler

Code

protected function createProfileFromData(array $data) {
  $profile = $this
    ->getProfile($data);
  if ($data['parent']) {
    $parent = $this
      ->getMongo()
      ->findOne(array(
      '_id' => $data['parent'],
      'data' => array(
        '$exists' => true,
      ),
    ));
    if ($parent) {
      $profile
        ->setParent($this
        ->getProfile($this
        ->getData($parent)));
    }
  }
  $profile
    ->setChildren($this
    ->readChildren($data['token']));
  return $profile;
}