SwitchUserEvent.php 850 B

123456789101112131415161718192021222324252627282930313233343536373839
  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\Event;
  11. use Symfony\Component\HttpFoundation\Request;
  12. use Symfony\Component\Security\Core\User\UserInterface;
  13. use Symfony\Component\EventDispatcher\Event;
  14. class SwitchUserEvent extends Event
  15. {
  16. private $request;
  17. private $targetUser;
  18. public function __construct(Request $request, UserInterface $targetUser)
  19. {
  20. $this->request = $request;
  21. $this->targetUser = $targetUser;
  22. }
  23. public function getRequest()
  24. {
  25. return $this->request;
  26. }
  27. public function getTargetUser()
  28. {
  29. return $this->targetUser;
  30. }
  31. }