public static function getExtensionForType($mime_type) {
		static::ensureDataLoaded();

		if (!static::hasType($mime_type)) {
			return;
		}

		$extensions = static::$mime_types[$mime_type];
		if (is_array($extensions)) {
			return $extensions[0];
		}

		return $extensions;
	}
public static function getExtensionForType($mime_type) {
		static::ensureDataLoaded();

		if (!static::hasType($mime_type)) {
			return;
		}

		$extensions = static::$mime_types[$mime_type];
		if (is_array($extensions)) {
			return $extensions[0];
		}

		return $extensions;
	}
public static function getExtensionForType ( $ mime_type ) { static :: ensureDataLoaded ( ) ; if ( ! static :: hasType ( $ mime_type ) ) { return ; } $ extensions = static :: $ mime_types [ $ mime_type ] ; if ( is_array ( $ extensions ) ) { return $ extensions [ 0 ] ; } return $ extensions ; }
Get the extension associated with a given MIME type.

@param string $mime_type A MIME type e.g. application/pdf.

@return string|null The first available associated extension or null if none found.
Get the extension associated with a given MIME type .