1 | <?php |
||
21 | class Recipient |
||
22 | { |
||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | private $header = []; |
||
27 | |||
28 | /** |
||
29 | * @var null|string |
||
30 | */ |
||
31 | private $encryptedKey; |
||
32 | |||
33 | public function __construct(array $header, ?string $encryptedKey) |
||
38 | |||
39 | /** |
||
40 | * Returns the recipient header. |
||
41 | */ |
||
42 | public function getHeader(): array |
||
46 | |||
47 | /** |
||
48 | * Returns the value of the recipient header parameter with the specified key. |
||
49 | * |
||
50 | * @param string $key The key |
||
51 | * |
||
52 | * @throws InvalidArgumentException if the header parameter does not exist |
||
53 | * |
||
54 | * @return null|mixed |
||
55 | */ |
||
56 | public function getHeaderParameter(string $key) |
||
64 | |||
65 | /** |
||
66 | * Returns true if the recipient header contains the parameter with the specified key. |
||
67 | * |
||
68 | * @param string $key The key |
||
69 | */ |
||
70 | public function hasHeaderParameter(string $key): bool |
||
74 | |||
75 | /** |
||
76 | * Returns the encrypted key. |
||
77 | */ |
||
78 | public function getEncryptedKey(): ?string |
||
82 | } |
||
83 |