| 1 | <?php |
||
| 17 | class ApnId |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private $value; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Create ApnID from null |
||
| 26 | * |
||
| 27 | * @return ApnId |
||
| 28 | */ |
||
| 29 | public static function fromNull() : ApnId |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Create from id |
||
| 36 | * |
||
| 37 | * @param string $id |
||
| 38 | * |
||
| 39 | * @return ApnId |
||
| 40 | * |
||
| 41 | * @throws \InvalidArgumentException |
||
| 42 | */ |
||
| 43 | public static function fromId(string $id) : ApnId |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Is null Apn ID? |
||
| 52 | * |
||
| 53 | * @return bool |
||
| 54 | */ |
||
| 55 | public function isNull() |
||
| 59 | |||
| 60 | /** |
||
| 61 | * Get value |
||
| 62 | * |
||
| 63 | * @return string |
||
| 64 | * |
||
| 65 | * @throws \LogicException |
||
| 66 | */ |
||
| 67 | public function getValue() : string |
||
| 75 | |||
| 76 | /** |
||
| 77 | * Constructor. |
||
| 78 | * |
||
| 79 | * @param string $id |
||
| 80 | */ |
||
| 81 | private function __construct($id) |
||
| 85 | |||
| 86 | /** |
||
| 87 | * Validate ID |
||
| 88 | * |
||
| 89 | * @param string $id |
||
| 90 | * |
||
| 91 | * @throws \InvalidArgumentException |
||
| 92 | */ |
||
| 93 | private static function validateId(string $id) |
||
| 102 | } |
||
| 103 |