This method checks if the value is of the specified enumerable type.
A value is a valid enumerable value if it is equal to the name of a constant
in the specified enumerable type (class).
For more details about enumerable, see {@link TEnumerable}.
For backward compatibility, this method also supports sanity
check of a string value to see if it is among the given list of strings.
public static ensureEnum ( $value, $enums ) : string | ||
return | string | the valid enumeration value |