Class flMimeTypes
flMimeTypes Class
Class to handle mime type information.
Package: fusionLib
Copyright:
Copyright (c) 2008 - 2013 fusionLib. All rights reserved.
Located at system/libs/Mime/flMimeTypes.php
Methods summary
public static
string
|
#
getType( string $fileExt, string $default = 'application/octect-stream' )
Lookup a mime type for the given file extension.
Lookup a mime type for the given file extension.
Parameters
- $fileExt
- The file extension to look up the mime type of or a complete filename.
- $default
- The default type to return if the type is unknown.
Returns
string The mime type or $default if the file extension is not known.
|
public static
string
|
#
lookupType( string $type )
Lookup a file type from a mime type.
Lookup a file type from a mime type.
Querying for text/xml will return xml.
Parameters
- $type
- The mime type to query for.
Returns
string The first type that matches the query or false if no matches.
|