AlgorithmManagerFactory
in package
Table of Contents
Properties
- $algorithms : array<string|int, mixed>
Methods
- add() : void
- Adds an algorithm.
- aliases() : array<string|int, string>
- Returns the list of aliases.
- all() : array<string|int, Algorithm>
- Returns all algorithms supported by this factory.
- create() : AlgorithmManager
- Create an algorithm manager using the given aliases.
Properties
$algorithms
private
array<string|int, mixed>
$algorithms
= []
Methods
add()
Adds an algorithm.
public
add(string $alias, Algorithm $algorithm) : void
Each algorithm is identified by an alias hence it is allowed to have the same algorithm twice (or more). This can be helpful when an algorithm have several configuration options.
Parameters
- $alias : string
- $algorithm : Algorithm
aliases()
Returns the list of aliases.
public
aliases() : array<string|int, string>
Return values
array<string|int, string>all()
Returns all algorithms supported by this factory.
public
all() : array<string|int, Algorithm>
This is an associative array. Keys are the aliases of the algorithms.
Return values
array<string|int, Algorithm>create()
Create an algorithm manager using the given aliases.
public
create(array<string|int, string> $aliases) : AlgorithmManager
Parameters
- $aliases : array<string|int, string>