AlgorithmManager
in package
Table of Contents
Properties
- $algorithms : array<string|int, mixed>
Methods
- __construct() : mixed
- add() : void
- Adds an algorithm to the manager.
- get() : Algorithm
- Returns the algorithm if supported, otherwise throw an exception.
- has() : bool
- Returns true if the algorithm is supported.
- list() : array<string|int, string>
- Returns the list of names of supported algorithms.
Properties
$algorithms
private
array<string|int, mixed>
$algorithms
= []
Methods
__construct()
public
__construct(array<string|int, Algorithm> $algorithms) : mixed
Parameters
- $algorithms : array<string|int, Algorithm>
add()
Adds an algorithm to the manager.
public
add(Algorithm $algorithm) : void
Parameters
- $algorithm : Algorithm
get()
Returns the algorithm if supported, otherwise throw an exception.
public
get(string $algorithm) : Algorithm
Parameters
- $algorithm : string
-
The algorithm
Tags
Return values
Algorithmhas()
Returns true if the algorithm is supported.
public
has(string $algorithm) : bool
Parameters
- $algorithm : string
-
The algorithm
Return values
boollist()
Returns the list of names of supported algorithms.
public
list() : array<string|int, string>