1 | <?php |
||
20 | final class ClaimCheckerManagerFactory |
||
21 | { |
||
22 | /** |
||
23 | * @var EventDispatcherInterface |
||
24 | */ |
||
25 | private $eventDispatcher; |
||
26 | |||
27 | /** |
||
28 | * @var ClaimChecker[] |
||
29 | */ |
||
30 | private $checkers = []; |
||
31 | |||
32 | public function __construct(EventDispatcherInterface $eventDispatcher) |
||
36 | |||
37 | /** |
||
38 | * This method creates a Claim Checker Manager and populate it with the claim checkers found based on the alias. |
||
39 | * If the alias is not supported, an InvalidArgumentException is thrown. |
||
40 | * |
||
41 | * @param string[] $aliases |
||
42 | */ |
||
43 | public function create(array $aliases): ClaimCheckerManager |
||
55 | |||
56 | /** |
||
57 | * This method adds a claim checker to this factory. |
||
58 | */ |
||
59 | public function add(string $alias, ClaimChecker $checker): void |
||
63 | |||
64 | /** |
||
65 | * Returns all claim checker aliases supported by this factory. |
||
66 | * |
||
67 | * @return string[] |
||
68 | */ |
||
69 | public function aliases(): array |
||
73 | |||
74 | /** |
||
75 | * Returns all claim checkers supported by this factory. |
||
76 | * |
||
77 | * @return ClaimChecker[] |
||
78 | */ |
||
79 | public function all(): array |
||
83 | } |
||
84 |