public static function mimeToExt($type)
    {
        if (empty($type)) {
            return false;
        }

        if (($key = array_search($type, self::_getMimeExtensionMap())) === false) {
            list($major, $minor) = explode('/', $type);
            if ($major == 'x-extension') {
                return $minor;
            }
            if (strpos($minor, 'x-') === 0) {
                return substr($minor, 2);
            }
            return false;
        }

        return $key;
    }
public static function mimeToExt($type)
    {
        if (empty($type)) {
            return false;
        }

        if (($key = array_search($type, self::_getMimeExtensionMap())) === false) {
            list($major, $minor) = explode('/', $type);
            if ($major == 'x-extension') {
                return $minor;
            }
            if (strpos($minor, 'x-') === 0) {
                return substr($minor, 2);
            }
            return false;
        }

        return $key;
    }
public static function mimeToExt ( $ type ) { if ( empty ( $ type ) ) { return false ; } if ( ( $ key = array_search ( $ type , self :: _getMimeExtensionMap ( ) ) ) === false ) { list ( $ major , $ minor ) = explode ( '/' , $ type ) ; if ( $ major == 'x-extension' ) { return $ minor ; } if ( strpos ( $ minor , 'x-' ) === 0 ) { return substr ( $ minor , 2 ) ; } return false ; } return $ key ; }
Attempt to convert a MIME type to a file extension, based
on the global Horde and application specific config files.

If we cannot map the type to a file extension, we return false.

@param string $type  The MIME type to be mapped to a file extension.

@return string  The file extension of the MIME type.
Attempt to convert a MIME type to a file extension based on the global Horde and application specific config files .