vendor/symfony/ux-turbo/src/Request/RequestListener.php line 24

  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\UX\Turbo\Request;
  11. use Symfony\Component\HttpFoundation\Request;
  12. use Symfony\UX\Turbo\TurboBundle;
  13. /**
  14.  * Registers the Turbo request format for all requests.
  15.  *
  16.  * @author Alexander Hofbauer <a.hofbauer@fify.at>
  17.  */
  18. final class RequestListener
  19. {
  20.     public function __invoke(): void
  21.     {
  22.         (new Request())->setFormat(TurboBundle::STREAM_FORMATTurboBundle::STREAM_MEDIA_TYPE);
  23.     }
  24. }