EncoderFactory
in package
implements
EncoderFactoryInterface
A generic encoder factory implementation.
Tags
Interfaces, Classes, Traits and Enums
- EncoderFactoryInterface
- EncoderFactoryInterface to support different encoders for different accounts.
Table of Contents
- $encoders : mixed
- __construct() : mixed
- getEncoder() : PasswordEncoderInterface
- Returns the password encoder to use for the given account.
- createEncoder() : PasswordEncoderInterface
- Creates the actual encoder instance.
- getEncoderConfigFromAlgorithm() : array<string|int, mixed>
Properties
$encoders
private
mixed
$encoders
Methods
__construct()
public
__construct(array<string|int, mixed> $encoders) : mixed
Parameters
- $encoders : array<string|int, mixed>
Return values
mixed —getEncoder()
Returns the password encoder to use for the given account.
public
getEncoder(mixed $user) : PasswordEncoderInterface
Parameters
- $user : mixed
-
A UserInterface instance or a class name
Return values
PasswordEncoderInterface —createEncoder()
Creates the actual encoder instance.
private
createEncoder(array<string|int, mixed> $config[, bool $isExtra = false ]) : PasswordEncoderInterface
Parameters
- $config : array<string|int, mixed>
- $isExtra : bool = false
Tags
Return values
PasswordEncoderInterface —getEncoderConfigFromAlgorithm()
private
getEncoderConfigFromAlgorithm(array<string|int, mixed> $config) : array<string|int, mixed>
Parameters
- $config : array<string|int, mixed>