public static function getTypeForExtension($extension) {
		static::ensureDataLoaded();

		$extension = strtolower($extension);
		foreach (static::$mime_types as $mime_type => $extensions) {
			if (is_array($extensions)) {
				if (in_array($extension, $extensions, true)) {
					return $mime_type;
				}
			} else if ($extension === $extensions) {
				return $mime_type;
			}
		}
	}
public static function getTypeForExtension($extension) {
		static::ensureDataLoaded();

		$extension = strtolower($extension);
		foreach (static::$mime_types as $mime_type => $extensions) {
			if (is_array($extensions)) {
				if (in_array($extension, $extensions, true)) {
					return $mime_type;
				}
			} else if ($extension === $extensions) {
				return $mime_type;
			}
		}
	}
public static function getTypeForExtension ( $ extension ) { static :: ensureDataLoaded ( ) ; $ extension = strtolower ( $ extension ) ; foreach ( static :: $ mime_types as $ mime_type => $ extensions ) { if ( is_array ( $ extensions ) ) { if ( in_array ( $ extension , $ extensions , true ) ) { return $ mime_type ; } } else if ( $ extension === $ extensions ) { return $ mime_type ; } } }
Get the MIME type associated with a given extension.

@param string $extension A file extension e.g. pdf.

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