public static function getName( $value ) {

        $constants = array_flip( static::getValues() );

        if( !isset( $constants[ $value ] ) )
            throw new InvalidArgumentException( "Invalid argument passed to Enum::getName: $value is not a valid value in this enum" );

        return $constants[ $value ];
    }
public static function getName( $value ) {

        $constants = array_flip( static::getValues() );

        if( !isset( $constants[ $value ] ) )
            throw new InvalidArgumentException( "Invalid argument passed to Enum::getName: $value is not a valid value in this enum" );

        return $constants[ $value ];
    }
public static function getName ( $ value ) { $ constants = array_flip ( static :: getValues ( ) ) ; if ( ! isset ( $ constants [ $ value ] ) ) throw new InvalidArgumentException ( "Invalid argument passed to Enum::getName: $value is not a valid value in this enum" ) ; return $ constants [ $ value ] ; }
Returns the name for a specific enum value.
Notice that it find's the first constant having that value, all constants with the same
value after that will be ignored

@param mixed $value The value for the constant name to find

@return string The name of the constant with the given value
Returns the name for a specific enum value . Notice that it find s the first constant having that value all constants with the same value after that will be ignored