Файловый менеджер - Редактировать - /home/avadvi5/calendar.aeronextgen.com/davis/vendor/symfony/twig-bridge/Extension/ProfilerExtension.php
Ðазад
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bridge\Twig\Extension; use Symfony\Component\Stopwatch\Stopwatch; use Symfony\Component\Stopwatch\StopwatchEvent; use Twig\Extension\ProfilerExtension as BaseProfilerExtension; use Twig\Profiler\Profile; /** * @author Fabien Potencier <fabien@symfony.com> */ final class ProfilerExtension extends BaseProfilerExtension { /** * @var \SplObjectStorage<Profile, StopwatchEvent> */ private \SplObjectStorage $events; public function __construct( Profile $profile, private ?Stopwatch $stopwatch = null, ) { parent::__construct($profile); $this->events = new \SplObjectStorage(); } public function enter(Profile $profile): void { if ($this->stopwatch && $profile->isTemplate()) { $this->events[$profile] = $this->stopwatch->start($profile->getName(), 'template'); } parent::enter($profile); } public function leave(Profile $profile): void { parent::leave($profile); if ($this->stopwatch && $profile->isTemplate()) { $this->events[$profile]->stop(); unset($this->events[$profile]); } } }
| ver. 1.1 | |
.
| PHP 8.3.30 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0 |
proxy
|
phpinfo
|
ÐаÑтройка