Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FileProfilerStorage.php

function FileProfilerStorage::createProfileFromData

1 call to FileProfilerStorage::createProfileFromData()
FileProfilerStorage::doRead in vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php

File

vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php, line 265

Class

FileProfilerStorage
Storage for profiler using files.

Namespace

Symfony\Component\HttpKernel\Profiler

Code

protected function createProfileFromData(string $token, array $data, ?Profile $parent = null) : Profile {
    $profile = new Profile($token);
    $profile->setIp($data['ip']);
    $profile->setMethod($data['method']);
    $profile->setUrl($data['url']);
    $profile->setTime($data['time']);
    $profile->setStatusCode($data['status_code']);
    $profile->setVirtualType($data['virtual_type'] ?: 'request');
    $profile->setCollectors($data['data']);
    if (!$parent && $data['parent']) {
        $parent = $this->read($data['parent']);
    }
    if ($parent) {
        $profile->setParent($parent);
    }
    foreach ($data['children'] as $token) {
        if (null !== ($childProfile = $this->doRead($token, $profile))) {
            $profile->addChild($childProfile);
        }
    }
    return $profile;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal