1 | <?php |
||
17 | class RFC822Name extends GeneralName |
||
18 | { |
||
19 | /** |
||
20 | * Email. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | protected $_email; |
||
25 | |||
26 | /** |
||
27 | * Constructor. |
||
28 | * |
||
29 | * @param string $email |
||
30 | */ |
||
31 | 11 | public function __construct(string $email) |
|
32 | { |
||
33 | 11 | $this->_tag = self::TAG_RFC822_NAME; |
|
34 | 11 | $this->_email = $email; |
|
35 | 11 | } |
|
36 | |||
37 | /** |
||
38 | * {@inheritdoc} |
||
39 | * |
||
40 | * @return self |
||
41 | */ |
||
42 | 9 | public static function fromChosenASN1(UnspecifiedType $el): GeneralName |
|
45 | } |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 1 | public function string(): string |
|
51 | { |
||
52 | 1 | return $this->_email; |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * Get email. |
||
57 | * |
||
58 | * @return string |
||
59 | */ |
||
60 | 2 | public function email(): string |
|
61 | { |
||
62 | 2 | return $this->_email; |
|
63 | } |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | 16 | protected function _choiceASN1(): TaggedType |
|
71 | } |
||
72 | } |
||
73 |