Total Complexity | 6 |
Total Lines | 75 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | class UnknownExtension extends Extension |
||
14 | { |
||
15 | /** |
||
16 | * Decoded extension value. |
||
17 | * |
||
18 | * @var null|Element |
||
19 | */ |
||
20 | protected $_element; |
||
21 | |||
22 | /** |
||
23 | * Raw extension value. |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $_data; |
||
28 | |||
29 | /** |
||
30 | * Constructor. |
||
31 | * |
||
32 | * @param string $oid |
||
33 | * @param bool $critical |
||
34 | * @param Element $element |
||
35 | */ |
||
36 | 7 | public function __construct(string $oid, bool $critical, Element $element) |
|
41 | 7 | } |
|
42 | |||
43 | /** |
||
44 | * Create instance from a raw encoded extension value. |
||
45 | * |
||
46 | * @param string $oid |
||
47 | * @param bool $critical |
||
48 | * @param string $data |
||
49 | * |
||
50 | * @return self |
||
51 | */ |
||
52 | 2 | public static function fromRawString(string $oid, bool $critical, |
|
59 | } |
||
60 | |||
61 | /** |
||
62 | * Get the encoded extension value. |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | 2 | public function extensionValue(): string |
|
67 | { |
||
68 | 2 | return $this->_data; |
|
69 | } |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | 2 | protected function _extnValue(): OctetString |
|
77 | } |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | */ |
||
82 | 2 | protected function _valueASN1(): Element |
|
88 | } |
||
89 | } |
||
90 |