public static function valueOf($str) {
			$key = get_called_class();

			if (!array_key_exists($key, self::$types))
				return null;

			$str = str_replace(array(' ', '-'), '_', trim($str));

			if (array_key_exists($str, self::$types[$key]))
				return self::$types[$key][$str];

			return null;
		}
public static function valueOf($str) {
			$key = get_called_class();

			if (!array_key_exists($key, self::$types))
				return null;

			$str = str_replace(array(' ', '-'), '_', trim($str));

			if (array_key_exists($str, self::$types[$key]))
				return self::$types[$key][$str];

			return null;
		}
public static function valueOf ( $ str ) { $ key = get_called_class ( ) ; if ( ! array_key_exists ( $ key , self :: $ types ) ) return null ; $ str = str_replace ( array ( ' ' , '-' ) , '_' , trim ( $ str ) ) ; if ( array_key_exists ( $ str , self :: $ types [ $ key ] ) ) return self :: $ types [ $ key ] [ $ str ] ; return null ; }
Attempts to match a string name to an enum element.

Strings passed to this method will be converted to a format allowable in an enum name. That is to say,
they will have any spaces or dashes converted to underscores, and all whitespace on either side of the
string will be trimmed.

@param  string $str the string to match to an enum element name
@return the matched enum element, or null if one could not be found
Attempts to match a string name to an enum element .