public static function isDefinedName($enumType, $name)
    {
        $names = $enumType::names();
        $result = false;

        foreach ($names as $item) {
            if ($item === $name) {
                $result = true;
                break;
            }
        }

        return $result;
    }
public static function isDefinedName($enumType, $name)
    {
        $names = $enumType::names();
        $result = false;

        foreach ($names as $item) {
            if ($item === $name) {
                $result = true;
                break;
            }
        }

        return $result;
    }
public static function isDefinedName ( $ enumType , $ name ) { $ names = $ enumType :: names ( ) ; $ result = false ; foreach ( $ names as $ item ) { if ( $ item === $ name ) { $ result = true ; break ; } } return $ result ; }
Checks whether an enumeration constant with the specified name exists in
the specified enumeration type.

@param string $enumType The class name of the enumeration type to check.
@param string $name     The name of the enumeration constant to check.

@return boolean `true` if the enumeration constant with the specified
name exists in the specified enumeration type; `false`
otherwise.
Checks whether an enumeration constant with the specified name exists in the specified enumeration type .