vendor/symfony/security-http/Firewall/AbstractListener.php line 26

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\Component\Security\Http\Firewall;
  11. use Symfony\Component\HttpKernel\Event\RequestEvent;
  12. /**
  13. * A base class for listeners that can tell whether they should authenticate incoming requests.
  14. *
  15. * @author Nicolas Grekas <p@tchwork.com>
  16. */
  17. abstract class AbstractListener implements FirewallListenerInterface
  18. {
  19. final public function __invoke(RequestEvent $event)
  20. {
  21. if (false !== $this->supports($event->getRequest())) {
  22. $this->authenticate($event);
  23. }
  24. }
  25. public static function getPriority(): int
  26. {
  27. return 0; // Default
  28. }
  29. }