LogoutSuccessHandlerInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  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\Logout;
  11. use Symfony\Component\HttpFoundation\Request;
  12. use Symfony\Component\HttpFoundation\Response;
  13. use Symfony\Component\Security\Http\Event\LogoutEvent;
  14. trigger_deprecation('symfony/security-http', '5.1', 'The "%s" interface is deprecated, create a listener for the "%s" event instead.', LogoutSuccessHandlerInterface::class, LogoutEvent::class);
  15. /**
  16. * LogoutSuccesshandlerInterface.
  17. *
  18. * In contrast to the LogoutHandlerInterface, this interface can return a response
  19. * which is then used instead of the default behavior.
  20. *
  21. * If you want to only perform some logout related clean-up task, use the
  22. * LogoutHandlerInterface instead.
  23. *
  24. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  25. *
  26. * @deprecated since Symfony 5.1
  27. */
  28. interface LogoutSuccessHandlerInterface
  29. {
  30. /**
  31. * Creates a Response object to send upon a successful logout.
  32. *
  33. * @return Response never null
  34. */
  35. public function onLogoutSuccess(Request $request);
  36. }