public static function isOneOf($value, $allowed)
{
/**
* @todo: Consider allowing a string for $allowed, where each
* character in the string is an allowed character in the
* value.
*/
if (is_string($allowed)) {
$allowed = str_split($allowed);
}
return in_array($value, $allowed);
}