Debian Codegraph @

lib/3rdParty/composer/web-token/jwt-library/Signature/JWSBuilderFactory.php

raw symbols SCIP
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Jose\Component\Signature;
6
7 use Jose\Component\Core\AlgorithmManagerFactory;
8
9 class JWSBuilderFactory
10 {
11 public function __construct(
12 private readonly AlgorithmManagerFactory $signatureAlgorithmManagerFactory
13 ) {
14 }
15
16 /**
17 * This method creates a JWSBuilder using the given algorithm aliases.
18 *
19 * @param string[] $algorithms
20 */
21 public function create(array $algorithms): JWSBuilder
22 {
23 $algorithmManager = $this->signatureAlgorithmManagerFactory->create($algorithms);
24
25 return new JWSBuilder($algorithmManager);
26 }
27 }