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

		$extension = strtolower($extension);
		foreach (static::$mime_types as $extensions) {
			if (is_array($extensions)) {
				if (in_array($extension, $extensions, true)) {
					return true;
				}
			} else if ($extension === $extensions) {
				return true;
			}
		}

		return false;
	}
public static function hasExtension($extension) {
		static::ensureDataLoaded();

		$extension = strtolower($extension);
		foreach (static::$mime_types as $extensions) {
			if (is_array($extensions)) {
				if (in_array($extension, $extensions, true)) {
					return true;
				}
			} else if ($extension === $extensions) {
				return true;
			}
		}

		return false;
	}
public static function hasExtension ( $ extension ) { static :: ensureDataLoaded ( ) ; $ extension = strtolower ( $ extension ) ; foreach ( static :: $ mime_types as $ extensions ) { if ( is_array ( $ extensions ) ) { if ( in_array ( $ extension , $ extensions , true ) ) { return true ; } } else if ( $ extension === $ extensions ) { return true ; } } return false ; }
Check if an extension is known.

@param string $extension An extension e.g. pdf.

@return boolean
Check if an extension is known .