private static $extensionLoaded = false;
/** Initializes the MimeMagic object. This is called by MimeMagic::singleton().
- *
- * This constructor parses the mime.types and mime.info files and build internal mappings.
- */
+ *
+ * This constructor parses the mime.types and mime.info files and build internal mappings.
+ */
function __construct() {
- /*
+ /**
* --- load mime.types ---
*/
}
}
- /*
- * --- load mime.info ---
- */
+ /**
+ * --- load mime.info ---
+ */
global $wgMimeInfoFile;
if ( $wgMimeInfoFile == 'includes/mime.info' ) {
/**
* Returns true if the mime type is known to represent an image format
* supported by the PHP GD library.
+ *
+ * @param $mime string
+ *
+ * @return bool
*/
public function isPHPImageType( $mime ) {
// As defined by imagegetsize and image_type_to_mime
return "image/webp";
}
- /*
+ /**
* Look for PHP. Check for this before HTML/XML... Warning: this is a
* heuristic, and won't match a file with a lot of non-PHP before. It
* will also match text files which could be PHP. :)
return 'application/x-php';
}
- /*
+ /**
* look for XML formats (XHTML and SVG)
*/
$xml = new XmlTypeCheck( $file );
}
}
- /*
+ /**
* look for shell scripts
*/
$script_type = null;