Debian Codegraph @

lib/3rdParty/composer/web-token/jwt-library/KeyManagement/Analyzer/KeysetAnalyzerManager.php

raw symbols SCIP
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Jose\Component\KeyManagement\Analyzer;
6
7 use Jose\Component\Core\JWKSet;
8
9 class KeysetAnalyzerManager
10 {
11 /**
12 * @var KeysetAnalyzer[]
13 */
14 private array $analyzers = [];
15
16 /**
17 * Adds a Keyset Analyzer to the manager.
18 */
19 public function add(KeysetAnalyzer $analyzer): void
20 {
21 $this->analyzers[] = $analyzer;
22 }
23
24 /**
25 * This method will analyze the JWKSet object using all analyzers. It returns a message bag that may contains
26 * messages.
27 */
28 public function analyze(JWKSet $jwkset): MessageBag
29 {
30 $bag = new MessageBag();
31 foreach ($this->analyzers as $analyzer) {
32 $analyzer->analyze($jwkset, $bag);
33 }
34
35 return $bag;
36 }
37 }