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
Interfaces, Classes, Traits and Enums
- UserProviderInterface
- Represents a class that loads UserInterface objects from some source for the authentication system.
- PasswordUpgraderInterface
Table of Contents
- $providers : mixed
- __construct() : mixed
- getProviders() : array<string|int, mixed>
- loadUserByUsername() : UserInterface
- Loads the user for the given username.
- refreshUser() : UserInterface
- Refreshes the user.
- supportsClass() : bool
- Whether this provider supports the given user class.
- upgradePassword() : void
- Upgrades the encoded password of a user, typically for using a better hash algorithm.
Properties
$providers
private
mixed
$providers
Methods
__construct()
public
__construct(iteratable<string|int, mixed>|array<string|int, UserProviderInterface> $providers) : mixed
Parameters
- $providers : iteratable<string|int, mixed>|array<string|int, UserProviderInterface>
Return values
mixed —getProviders()
public
getProviders() : array<string|int, mixed>
Return values
array<string|int, mixed> —loadUserByUsername()
Loads the user for the given username.
public
loadUserByUsername(mixed $username) : UserInterface
Parameters
- $username : mixed
-
The username
Return values
UserInterface —refreshUser()
Refreshes the user.
public
refreshUser(UserInterface $user) : UserInterface
Parameters
- $user : UserInterface
Return values
UserInterface —supportsClass()
Whether this provider supports the given user class.
public
supportsClass(mixed $class) : bool
Parameters
- $class : mixed
Return values
bool —upgradePassword()
Upgrades the encoded password of a user, typically for using a better hash algorithm.
public
upgradePassword(UserInterface $user, string $newEncodedPassword) : void
Parameters
- $user : UserInterface
- $newEncodedPassword : string