private static function retrieveOrdinalFor($name)
    {
        $result = null;

        foreach (self::names() as $key => $value) {
            if ($name === $value) {
                $result = $key;
                break;
            }
        }

        return $result;
    }
private static function retrieveOrdinalFor($name)
    {
        $result = null;

        foreach (self::names() as $key => $value) {
            if ($name === $value) {
                $result = $key;
                break;
            }
        }

        return $result;
    }
private static function retrieveOrdinalFor ( $ name ) { $ result = null ; foreach ( self :: names ( ) as $ key => $ value ) { if ( $ name === $ value ) { $ result = $ key ; break ; } } return $ result ; }
Returns the ordinal of the enumeration constant with the specified name
in this enumeration type.

@param string $name The name of the enumeration constant, which is the
identifier used to declare it.

@return integer The ordinal of the enumeration constant (its position in
the enumeration declaration, where the initial
enumeration constant is assigned an ordinal of zero).
Returns the ordinal of the enumeration constant with the specified name in this enumeration type .