FirewallContext.php 956 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /*
  3. * This file is part of the Symfony framework.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * This source file is subject to the MIT license that is bundled
  8. * with this source code in the file LICENSE.
  9. */
  10. namespace Symfony\Bundle\SecurityBundle\Security;
  11. use Symfony\Component\Security\Http\Firewall\ExceptionListener;
  12. /**
  13. * This is a wrapper around the actual firewall configuration which allows us
  14. * to lazy load the context for one specific firewall only when we need it.
  15. *
  16. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  17. */
  18. class FirewallContext
  19. {
  20. private $listeners;
  21. private $exceptionListener;
  22. public function __construct(array $listeners, ExceptionListener $exceptionListener = null)
  23. {
  24. $this->listeners = $listeners;
  25. $this->exceptionListener = $exceptionListener;
  26. }
  27. public function getContext()
  28. {
  29. return array($this->listeners, $this->exceptionListener);
  30. }
  31. }