final public function getOrdinal()
    {
        if ($this->ordinal === null) {
            $ordinal = 0;
            $value   = $this->value;
            foreach (self::detectConstants(static::class) as $constValue) {
                if ($value === $constValue) {
                    break;
                }
                ++$ordinal;
            }

            $this->ordinal = $ordinal;
        }

        return $this->ordinal;
    }
final public function getOrdinal()
    {
        if ($this->ordinal === null) {
            $ordinal = 0;
            $value   = $this->value;
            foreach (self::detectConstants(static::class) as $constValue) {
                if ($value === $constValue) {
                    break;
                }
                ++$ordinal;
            }

            $this->ordinal = $ordinal;
        }

        return $this->ordinal;
    }
final public function getOrdinal ( ) { if ( $ this -> ordinal === null ) { $ ordinal = 0 ; $ value = $ this -> value ; foreach ( self :: detectConstants ( static :: class ) as $ constValue ) { if ( $ value === $ constValue ) { break ; } ++ $ ordinal ; } $ this -> ordinal = $ ordinal ; } return $ this -> ordinal ; }
Get the ordinal number of the enumerator

@return int
Get the ordinal number of the enumerator