1 | <?php |
||
17 | class NetworkEnum |
||
|
|||
18 | { |
||
19 | private static $cache = []; |
||
20 | private static $telcoms = [ |
||
21 | 'mtn' => '01', |
||
22 | 'glo' => '02', |
||
23 | 'etisalat' => '03', |
||
24 | 'airtel' => '04', |
||
25 | ]; |
||
26 | |||
27 | private $code, $name; |
||
28 | |||
29 | private function __construct(string $code, string $name) |
||
34 | |||
35 | public function getCode(): string |
||
39 | |||
40 | public function getName(): string |
||
44 | |||
45 | public function toArray(): array |
||
49 | |||
50 | /** |
||
51 | * @param $name |
||
52 | * @return NetworkEnum|null |
||
53 | * @throws ClubKonnectErrorException |
||
54 | */ |
||
55 | public static function getNetwork($name): ?NetworkEnum |
||
65 | |||
66 | public function __toString(): string |
||
70 | } |
||
71 |