src/BaseEnum.php
public static function getValue($key)
    {
        $className = get_called_class();
        $reflectionClass = new ReflectionClass($className);

        if (! $reflectionClass->hasConstant($key)) {
            return static::DEFAULT_VALUE;
        }

        return $reflectionClass->getConstant($key);
    }
public static function getValue($key)
    {
        $className = get_called_class();
        $reflectionClass = new ReflectionClass($className);

        if (! $reflectionClass->hasConstant($key)) {
            return static::DEFAULT_VALUE;
        }

        return $reflectionClass->getConstant($key);
    }
public static function getValue ( $ key ) { $ className = get_called_class ( ) ; $ reflectionClass = new ReflectionClass ( $ className ) ; if ( ! $ reflectionClass -> hasConstant ( $ key ) ) { return static :: DEFAULT_VALUE ; } return $ reflectionClass -> getConstant ( $ key ) ; }
Returns an enum value by its key.

@return mixed
Returns an enum value by its key .