final public static function valueOf($name)
    {
        $result = null;

        try {
            /* @var $constant EnumAbstract */
            foreach (self::values() as $constant) {
                if ($constant->name === $name) {
                    $result = $constant;
                    break;
                }
            }
        } catch (InvalidArgumentException $ex) {
            // Empty block.
        }

        return $result;
    }
final public static function valueOf($name)
    {
        $result = null;

        try {
            /* @var $constant EnumAbstract */
            foreach (self::values() as $constant) {
                if ($constant->name === $name) {
                    $result = $constant;
                    break;
                }
            }
        } catch (InvalidArgumentException $ex) {
            // Empty block.
        }

        return $result;
    }
final public static function valueOf ( $ name ) { $ result = null ; try { /* @var $constant EnumAbstract */ foreach ( self :: values ( ) as $ constant ) { if ( $ constant -> name === $ name ) { $ result = $ constant ; break ; } } } catch ( InvalidArgumentException $ ex ) { // Empty block. } return $ result ; }
Returns the enumeration constant with the specified name from this
enumeration type.

The string must match exactly an identifier used to declare an
enumeration constant in this enumeration type. (Extraneous whitespace
characters are not permitted.)

@param string $name The name of the enumeration constant to return.

@return EnumAbstract|null The enumeration constant with the specified
name on success; `null` on failure.
Returns the enumeration constant with the specified name from this enumeration type .