![]() Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips System : Linux server1.richineiserver.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : fdshops ( 1003) PHP Version : 8.2.21 Disable Function : NONE Directory : /home/fdshops/public_html/vendor/barryvdh/laravel-debugbar/src/Twig/Extension/ |
<?php namespace Barryvdh\Debugbar\Twig\Extension; use Barryvdh\Debugbar\Twig\TokenParser\StopwatchTokenParser; use Illuminate\Foundation\Application; /** * Access Laravels auth class in your Twig templates. * Based on Symfony\Bridge\Twig\Extension\StopwatchExtension */ class Stopwatch extends Extension { /** * @var \Barryvdh\Debugbar\LaravelDebugbar */ protected $debugbar; /** * Create a new auth extension. * * @param \Illuminate\Foundation\Application $app */ public function __construct(Application $app) { if ($app->bound('debugbar')) { $this->debugbar = $app['debugbar']; } else { $this->debugbar = null; } } /** * {@inheritDoc} */ public function getName() { return 'stopwatch'; } public function getTokenParsers() { return [ /* * {% stopwatch foo %} * Some stuff which will be recorded on the timeline * {% endstopwatch %} */ new StopwatchTokenParser($this->debugbar !== null), ]; } public function getDebugbar() { return $this->debugbar; } }