1 | <?php |
||
17 | class CableTvEnum |
||
|
|||
18 | { |
||
19 | private static $cache = []; |
||
20 | private static $tvs = [ |
||
21 | 'dstv' => 'DStv', |
||
22 | 'gotv' => 'GOtv', |
||
23 | 'startimes' => 'Startimes', |
||
24 | ]; |
||
25 | |||
26 | private $code, $name; |
||
27 | |||
28 | private function __construct(string $code, string $name) |
||
33 | |||
34 | public function getCode(): string |
||
38 | |||
39 | public function getName(): string |
||
43 | |||
44 | public function toArray(): array |
||
48 | |||
49 | /** |
||
50 | * @param $code |
||
51 | * @return CableTvEnum|null |
||
52 | * @throws ClubKonnectErrorException |
||
53 | */ |
||
54 | public static function getCableTv($code): ?CableTvEnum |
||
63 | |||
64 | public function __toString(): string |
||
68 | } |
||
69 |