| 1 | <?php |
||
| 17 | class MeterTypeEnum |
||
|
|
|||
| 18 | { |
||
| 19 | private static $cache = []; |
||
| 20 | private static $telcoms = [ |
||
| 21 | 'prepaid' => '01', |
||
| 22 | 'postpaid' => '02', |
||
| 23 | ]; |
||
| 24 | |||
| 25 | private $code, $name; |
||
| 26 | |||
| 27 | private function __construct(string $code, string $name) |
||
| 32 | |||
| 33 | public function getCode(): string |
||
| 37 | |||
| 38 | public function getName(): string |
||
| 42 | |||
| 43 | public function toArray(): array |
||
| 47 | |||
| 48 | /** |
||
| 49 | * @param $name |
||
| 50 | * @return MeterTypeEnum|null |
||
| 51 | * @throws ClubKonnectErrorException |
||
| 52 | */ |
||
| 53 | public static function getMeterType($name): ?MeterTypeEnum |
||
| 63 | |||
| 64 | public function __toString(): string |
||
| 68 | } |
||
| 69 |