public static function check_value($value, $msg = null) { if (is_null(self::$instance)) { self::$instance = new self(); } BasicEnum::check_val(self::$instance, $value, $msg); }
public static function isValidValue($value) { if ($inner_type = self::isArrayType($value)) { return parent::isValidValue($inner_type); } return parent::isValidValue($value); }
private static function getConstants() { if (self::$constCache === NULL) { $reflect = new ReflectionClass(get_called_class()); self::$constCache = $reflect->getConstants(); } return self::$constCache; }
private static function getConstants() { if (self::$constCacheArray == NULL) { self::$constCacheArray = []; } $calledClass = get_called_class(); if (!array_key_exists($calledClass, self::$constCacheArray)) { $reflect = new ReflectionClass($calledClass); self::$constCacheArray[$calledClass] = $reflect->getConstants(); } return self::$constCacheArray[$calledClass]; }