This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Bundle/FrameworkBundle/Profiler.php

35 lines
1023 B
PHP

<?php
namespace Symfony\Bundle\FrameworkBundle;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpKernel\Profiler\Profiler as BaseProfiler;
use Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface;
use Symfony\Component\HttpKernel\Log\LoggerInterface;
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
/**
* Profiler.
*
* @author Fabien Potencier <fabien.potencier@symfony-project.com>
*/
class Profiler extends BaseProfiler
{
public function __construct(ContainerInterface $container, ProfilerStorageInterface $storage, LoggerInterface $logger = null)
{
parent::__construct($storage, $logger);
foreach ($container->findTaggedServiceIds('data_collector') as $id => $attributes) {
$this->addCollector($container->get($id));
}
}
}