Profiler.php 1014 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Symfony\Bundle\FrameworkBundle;
  3. use Symfony\Component\DependencyInjection\ContainerInterface;
  4. use Symfony\Component\HttpKernel\Profiler\Profiler as BaseProfiler;
  5. use Symfony\Component\HttpKernel\Profiler\ProfilerStorageInterface;
  6. use Symfony\Component\HttpKernel\Log\LoggerInterface;
  7. /*
  8. * This file is part of the Symfony framework.
  9. *
  10. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  11. *
  12. * This source file is subject to the MIT license that is bundled
  13. * with this source code in the file LICENSE.
  14. */
  15. /**
  16. * Profiler.
  17. *
  18. * @author Fabien Potencier <fabien.potencier@symfony-project.com>
  19. */
  20. class Profiler extends BaseProfiler
  21. {
  22. public function __construct(ContainerInterface $container, ProfilerStorageInterface $storage, LoggerInterface $logger = null)
  23. {
  24. parent::__construct($storage, $logger);
  25. foreach ($container->findTaggedServiceIds('data_collector') as $id => $attributes) {
  26. $this->add($container->get($id));
  27. }
  28. }
  29. }