| 1 | <?php |
||
| 14 | class UniqueIdentifier |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * Identifier. |
||
| 18 | * |
||
| 19 | * @var BitString $_uid |
||
| 20 | */ |
||
| 21 | protected $_uid; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Constructor. |
||
| 25 | * |
||
| 26 | * @param BitString $bs |
||
| 27 | */ |
||
| 28 | 16 | public function __construct(BitString $bs) |
|
| 32 | |||
| 33 | /** |
||
| 34 | * Initialize from ASN.1. |
||
| 35 | * |
||
| 36 | * @param BitString $bs |
||
| 37 | * @return self |
||
| 38 | */ |
||
| 39 | 4 | public static function fromASN1(BitString $bs): UniqueIdentifier |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Initialize from string. |
||
| 46 | * |
||
| 47 | * @param string $str |
||
| 48 | * @return self |
||
| 49 | */ |
||
| 50 | 12 | public static function fromString(string $str): UniqueIdentifier |
|
| 54 | |||
| 55 | /** |
||
| 56 | * Get unique identifier as a string. |
||
| 57 | * |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | 6 | public function string(): string |
|
| 64 | |||
| 65 | /** |
||
| 66 | * Get unique identifier as a bit string. |
||
| 67 | * |
||
| 68 | * @return BitString |
||
| 69 | */ |
||
| 70 | 1 | public function bitString(): BitString |
|
| 74 | |||
| 75 | /** |
||
| 76 | * Get ASN.1 element. |
||
| 77 | * |
||
| 78 | * @return BitString |
||
| 79 | */ |
||
| 80 | 12 | public function toASN1(): BitString |
|
| 84 | } |
||
| 85 |