Open MaryVictoria opened 8 years ago
I'm having same thing :/
Code: [18] abstract class ModelledEnum{ [19] /* @var static[] / [20] private static $pool = []; [21] [22] /* @var int / [23] private $id; [24] /* @var string / [25] private $name; [26] [27] protected static function addEnumEntry(static $entry){ [28] self::$pool[$entry->getId()] = $entry; [29] } [30] [31] public static function get($id){ [32] return isset(self::$pool[$id]) ? clone self::$pool[$id] : null; [33] } [34] [35] public static function getByName($name){ [36] foreach(self::$pool as $element){ [37] if($element->getName() === $name){
Static functions can not be protected.
This project is no longer under development now.