| 1 | <?php |
||
| 9 | abstract class Enum |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var mixed |
||
| 13 | */ |
||
| 14 | protected $enumValue; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | protected static $cache = array(); |
||
| 20 | |||
| 21 | /** |
||
| 22 | * Enum constructor. |
||
| 23 | * @param $enumValue |
||
| 24 | */ |
||
| 25 | 4 | public function __construct($enumValue) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @param $enumValue |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | 4 | private function isPartFromTheClass($enumValue) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @return void |
||
| 48 | */ |
||
| 49 | 4 | private function setCacheArray() |
|
| 56 | |||
| 57 | /** |
||
| 58 | * @return string |
||
| 59 | */ |
||
| 60 | 1 | public function __toString() |
|
| 64 | } |
||
| 65 |