vendor/symfony/security-core/Encoder/EncoderFactoryInterface.php line 17

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\Core\Encoder;
  11. use Symfony\Component\PasswordHasher\Hasher\PasswordHasherFactoryInterface;
  12. use Symfony\Component\Security\Core\User\UserInterface;
  13. trigger_deprecation('symfony/security-core', '5.3', 'The "%s" class is deprecated, use "%s" instead.', EncoderFactoryInterface::class, PasswordHasherFactoryInterface::class);
  14. /**
  15. * EncoderFactoryInterface to support different encoders for different accounts.
  16. *
  17. * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  18. *
  19. * @deprecated since Symfony 5.3, use {@link PasswordHasherFactoryInterface} instead
  20. */
  21. interface EncoderFactoryInterface
  22. {
  23. /**
  24. * Returns the password encoder to use for the given account.
  25. *
  26. * @param UserInterface|string $user A UserInterface instance or a class name
  27. *
  28. * @return PasswordEncoderInterface
  29. *
  30. * @throws \RuntimeException when no password encoder could be found for the user
  31. */
  32. public function getEncoder($user);
  33. }