1 | <?php |
||
13 | class CriticalParameter extends JWTParameter |
||
14 | { |
||
15 | use ArrayParameterValue; |
||
16 | |||
17 | /** |
||
18 | * Constructor |
||
19 | * |
||
20 | * @param string ...$names |
||
21 | */ |
||
22 | 7 | public function __construct(...$names) { |
|
25 | |||
26 | /** |
||
27 | * Get self with parameter name added. |
||
28 | * |
||
29 | * @param string $name |
||
30 | * @return self |
||
31 | */ |
||
32 | 3 | public function withParamName($name) { |
|
38 | |||
39 | /** |
||
40 | * Check whether given parameter name is critical. |
||
41 | * |
||
42 | * @param string $name |
||
43 | * @return bool |
||
44 | */ |
||
45 | 2 | public function has($name) { |
|
48 | |||
49 | /** |
||
50 | * Get critical header parameter names. |
||
51 | * |
||
52 | * @return string[] |
||
53 | */ |
||
54 | 3 | public function names() { |
|
57 | } |
||
58 |