Snc\RedisBundle\Profiler\Storage\RedisProfilerStorage::createProfileFromData PHP Метод

createProfileFromData() защищенный Метод

Creates a Profile.
protected createProfileFromData ( string $token, array $data, Symfony\Component\HttpKernel\Profiler\Profile $parent = null ) : Symfony\Component\HttpKernel\Profiler\Profile
$token string
$data array
$parent Symfony\Component\HttpKernel\Profiler\Profile
Результат Symfony\Component\HttpKernel\Profiler\Profile
    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']);
        if (!$parent && $data['parent']) {
            $parent = $this->read($data['parent']);
        }
        if ($parent) {
            $profile->setParent($parent);
        }
        foreach ($data['children'] as $token) {
            if (!$token) {
                continue;
            }
            if (!($childProfileData = $this->getValue($this->getItemName($token), self::REDIS_SERIALIZER_PHP))) {
                continue;
            }
            $profile->addChild($this->createProfileFromData($token, $childProfileData, $profile));
        }
        return $profile;
    }