Home » Tools and Utilities » MIME_Type
Utility class for dealing with MIME types
This package is unmaintained.
Download latest release 1.4.1 (there might be newer Composer installable version)
License: LGPL
Description
Provide functionality for dealing with MIME types.
* Parse MIME type.
* Supports full RFC2045 specification.
* Many utility functions for working with and determining info about types.
* Most functions can be called statically.
* Autodetect a file's mime-type, either with fileinfo extension,
mime_magic extension, the 'file' command or an in-built mapping list
Documentation
Maintainers
- Ian Eure (ieure) — lead, inactive
- Christian Weiske (cweiske) — developer, active
Dependencies
Required
- PHP (>= 5.4.0)
- PEAR Installer (>= 1.9.0)
- PEAR (>= 1.9.0)
Optional
Releases
- 1.4.1 (stable, 2015-11-04)
Release notes
License: LGPL
- Update extension-mime-mapping list; 785 new types.
- 1.4.0 (stable, 2015-10-07)
Release notes
License: LGPL
- Drop PHP4 support
- MIME_Type is E_STRICT-clean now - 1.3.5 (stable, 2015-06-15)
Release notes
License: LGPL
- add .m2t and .m2ts to extensionToType array
- 1.3.4 (stable, 2014-10-22)
Release notes
License: LGPL
- add mp4 to extensionToType array
- 1.3.3 (stable, 2013-10-03)
Release notes
License: LGPL
- Fix bug #20079: Corrupt tgz package
- 1.3.2 (stable, 2013-09-23)
Release notes
License: LGPL
- Fix bug #19609: file extension detection fails with uppercase extensions
- 1.3.1 (stable, 2012-02-25)
Release notes
License: LGPL
- Change license from PHP to LGPL
- 1.3.0 (stable, 2011-09-05)
Release notes
License: PHP License 3.0
- Implement request #17969: Configurable magic database file
- Fix bug #17969: Fall back to next method after file command error
- Single detection methods may be disabled - 1.2.1 (stable, 2010-10-25)
Release notes
License: PHP License 3.0
Automatically built QA release
Req #13646 Default to Mime Type based on Extension - cweiske - 1.2.0 (stable, 2009-01-16)
Release notes
License: PHP License 3.0
* Extension-to-MIMEType mapper by Christian Schmidt, bug #13646
- 1.1.3 (stable, 2008-10-25)
Release notes
License: PHP License 3.0
- Coding Standards cleanup
- parameters are cleared when parsing again
- more tests - 1.1.1 (stable, 2008-07-24)
Release notes
License: PHP License 3.0
- Fix #14150, notices due to use of =& new.
- 1.0.0 (stable, 2005-01-26)
Release notes
License: PHP License 3.0
- No changes since 1.0.0beta3.
- 1.0.0beta3 (beta, 2004-08-07)
Release notes
License: PHP License 3.0
* Add $parameters class var. (Fixes #2083)
* Quote filenames in _fileAutoDetect() (Fixes #2078) - 1.0.0beta2 (beta, 2004-06-16)
Release notes
License: PHP License 3.0
* Make changes as requested during the proposal/vote process.
Bugs
| ID | Status | Type | Version | Date | Summary |
|---|---|---|---|---|---|
| #2078 | Closed | Bug | 2004-08-07 | _fileAutoDetect should pass file in quotes | |
| #2083 | Closed | Bug | 2004-08-07 | get() throws notice about $this->parameters being undefined. | |
| #3719 | Closed | Req | 2005-03-06 | autodetect: If mime_content_type fails, _fileAutoDetect should still be used | |
| #4958 | Closed | Req | 2005-08-01 | MIME_Type: several detection routines | |
| #6095 | Closed | Bug | 2005-11-28 | Parameters and comments parsing buggy | |
| #8595 | Closed | Req | 1.0.0 | 2006-08-30 | location of the example file |
| #8603 | Closed | Bug | 1.0.0 | 2006-08-31 | function _fileAutoDetect() uses System_Command incorrectly |
| #10408 | Duplicate | Bug | 1.0.0 | 2007-03-18 | File with single quote crashes mime_type |
| #10568 | Wont fix | Req | 1.0.0 | 2007-03-30 | Improvement on using MIME_Type class |
| #13513 | Wont fix | Bug | CVS | 2008-03-27 | syntax error in php4 |
| #13646 | Closed | Req | 1.0.0 | 2008-04-10 | Default to Mime Type based on Extension |
| #14417 | Closed | Bug | 1.1.1 | 2008-07-29 | Parse Error in Type.php |
| #14463 | Duplicate | Bug | 1.1.1 | 2008-08-06 | Possible error with PHP 4 |
| #14630 | Closed | Bug | 1.1.1 | 2008-09-10 | PHP4 error |
| #16957 | Bogus | Bug | 1.2.0 | 2009-12-30 | mpgv / mpga not recognized |
| #17223 | Bogus | Req | 1.2.0 | 2010-03-15 | This class only returns text/plain |
| #17969 | Closed | Bug | SVN | 2010-10-18 | Sorry, couldn't determine file type. |
| #18785 | Duplicate | Req | SVN | 2011-09-04 | Change license |
| #19045 | Wont fix | Req | 1.3.0 | 2011-11-15 | 1.3.0 triggers bug in finfo_open() |
| #19609 | Closed | Bug | 1.3.1 | 2012-09-20 | mime type detection by file extension failes with uppercase extensions |
| #20079 | Closed | Bug | 1.3.2 | 2013-10-02 | Package Corruption |
| #21238 | Closed | Bug | 1.4.1 | 2017-08-25 | composer.json suggests non-existing "pear/system_command" |