Deprecated: Symfony\Component\Translation\t(): Implicitly marking parameter $domain as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/translation/Resources/functions.php on line 18

Deprecated: Symfony\Component\Dotenv\Dotenv::loadEnv(): Implicitly marking parameter $envKey as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/dotenv/Dotenv.php on line 110

Deprecated: Symfony\Component\Runtime\GenericRuntime::getResolver(): Implicitly marking parameter $reflector as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/runtime/GenericRuntime.php on line 89

Deprecated: Symfony\Component\Runtime\RuntimeInterface::getResolver(): Implicitly marking parameter $reflector as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/runtime/RuntimeInterface.php on line 26

Deprecated: Symfony\Component\Console\Input\ArgvInput::__construct(): Implicitly marking parameter $argv as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/console/Input/ArgvInput.php on line 46

Deprecated: Symfony\Component\Console\Input\ArgvInput::__construct(): Implicitly marking parameter $definition as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/console/Input/ArgvInput.php on line 46

Deprecated: Symfony\Component\Console\Input\Input::__construct(): Implicitly marking parameter $definition as nullable is deprecated, the explicit nullable type must be used instead in /var/www/html/t/taurushr/vendor/symfony/console/Input/Input.php on line 36

Deprecated: Constant E_STRICT is deprecated in /var/www/html/t/taurushr/vendor/symfony/error-handler/ErrorHandler.php on line 58

Deprecated: Constant E_STRICT is deprecated in /var/www/html/t/taurushr/vendor/symfony/error-handler/ErrorHandler.php on line 76
Symfony Profiler

vendor/symfony/twig-bridge/Extension/HttpKernelRuntime.php line 46

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\Bridge\Twig\Extension;
  11. use Symfony\Component\HttpKernel\Controller\ControllerReference;
  12. use Symfony\Component\HttpKernel\Fragment\FragmentHandler;
  13. use Symfony\Component\HttpKernel\Fragment\FragmentUriGeneratorInterface;
  14. /**
  15.  * Provides integration with the HttpKernel component.
  16.  *
  17.  * @author Fabien Potencier <fabien@symfony.com>
  18.  */
  19. final class HttpKernelRuntime
  20. {
  21.     private $handler;
  22.     private $fragmentUriGenerator;
  23.     public function __construct(FragmentHandler $handlerFragmentUriGeneratorInterface $fragmentUriGenerator null)
  24.     {
  25.         $this->handler $handler;
  26.         $this->fragmentUriGenerator $fragmentUriGenerator;
  27.     }
  28.     /**
  29.      * Renders a fragment.
  30.      *
  31.      * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance
  32.      *
  33.      * @see FragmentHandler::render()
  34.      */
  35.     public function renderFragment($uri, array $options = []): string
  36.     {
  37.         $strategy $options['strategy'] ?? 'inline';
  38.         unset($options['strategy']);
  39.         return $this->handler->render($uri$strategy$options);
  40.     }
  41.     /**
  42.      * Renders a fragment.
  43.      *
  44.      * @param string|ControllerReference $uri A URI as a string or a ControllerReference instance
  45.      *
  46.      * @see FragmentHandler::render()
  47.      */
  48.     public function renderFragmentStrategy(string $strategy$uri, array $options = []): string
  49.     {
  50.         return $this->handler->render($uri$strategy$options);
  51.     }
  52.     public function generateFragmentUri(ControllerReference $controllerbool $absolute falsebool $strict truebool $sign true): string
  53.     {
  54.         if (null === $this->fragmentUriGenerator) {
  55.             throw new \LogicException(sprintf('An instance of "%s" must be provided to use "%s()".'FragmentUriGeneratorInterface::class, __METHOD__));
  56.         }
  57.         return $this->fragmentUriGenerator->generate($controllernull$absolute$strict$sign);
  58.     }
  59. }