application/pdf pdf
application/vnd.oasis.opendocument.chart odc
application/vnd.oasis.opendocument.chart-template otc
+application/vnd.oasis.opendocument.database odb
application/vnd.oasis.opendocument.formula odf
application/vnd.oasis.opendocument.formula-template otf
application/vnd.oasis.opendocument.graphics odg
application/vnd.oasis.opendocument.spreadsheet ods
application/vnd.oasis.opendocument.spreadsheet-template ots
application/vnd.oasis.opendocument.text odt
-application/vnd.oasis.opendocument.text-template ott
application/vnd.oasis.opendocument.text-master otm
+application/vnd.oasis.opendocument.text-template ott
application/vnd.oasis.opendocument.text-web oth
application/x-javascript js
application/x-shockwave-flash swf
application/pdf [OFFICE]
application/vnd.oasis.opendocument.chart [OFFICE]
application/vnd.oasis.opendocument.chart-template [OFFICE]
+application/vnd.oasis.opendocument.database [OFFICE]
application/vnd.oasis.opendocument.formula [OFFICE]
application/vnd.oasis.opendocument.formula-template [OFFICE]
application/vnd.oasis.opendocument.graphics [OFFICE]
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
*
* @param string $file
* @param mixed $ext
+ * @return bool|string
*/
private function doGuessMimeType( $file, $ext ) { // TODO: remove $ext param
// Read a chunk of the file
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;
*
* This funktion relies on the mapping defined by $this->mMediaTypes
* @access private
+ * @return int|string
*/
function findMediaType( $extMime ) {
if ( strpos( $extMime, '.' ) === 0 ) {
* @param $fileName String: the file name (unused at present)
* @param $chunk String: the first 256 bytes of the file
* @param $proposed String: the MIME type proposed by the server
+ * @return Array
*/
public function getIEMimeTypes( $fileName, $chunk, $proposed ) {
$ca = $this->getIEContentAnalyzer();