ChainUserProvider
in package
implements
UserProviderInterface, PasswordUpgraderInterface
Chain User Provider.
This provider calls several leaf providers in a chain until one is able to handle the request.
Tags
Table of Contents
Interfaces
- UserProviderInterface
- Represents a class that loads UserInterface objects from some source for the authentication system.
- PasswordUpgraderInterface
Properties
- $providers : iterable<string|int, mixed>
Methods
- __construct() : mixed
- getProviders() : array<string|int, UserProviderInterface>
- loadUserByIdentifier() : UserInterface
- Loads the user for the given user identifier (e.g. username or email).
- refreshUser() : UserInterface
- Refreshes the user.
- supportsClass() : bool
- Whether this provider supports the given user class.
- upgradePassword() : void
- Upgrades the hashed password of a user, typically for using a better hash algorithm.
Properties
$providers
private
iterable<string|int, mixed>
$providers
Methods
__construct()
public
__construct(iterable<string|int, UserProviderInterface> $providers) : mixed
Parameters
- $providers : iterable<string|int, UserProviderInterface>
getProviders()
public
getProviders() : array<string|int, UserProviderInterface>
Return values
array<string|int, UserProviderInterface>loadUserByIdentifier()
Loads the user for the given user identifier (e.g. username or email).
public
loadUserByIdentifier(string $identifier) : UserInterface
This method must throw UserNotFoundException if the user is not found.
Parameters
- $identifier : string
Return values
UserInterfacerefreshUser()
Refreshes the user.
public
refreshUser(UserInterface $user) : UserInterface
Parameters
- $user : UserInterface
Return values
UserInterfacesupportsClass()
Whether this provider supports the given user class.
public
supportsClass(string $class) : bool
Parameters
- $class : string
Return values
boolupgradePassword()
Upgrades the hashed password of a user, typically for using a better hash algorithm.
public
upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword) : void
Parameters
- $user : PasswordAuthenticatedUserInterface
- $newHashedPassword : string