GitXplorerGitXplorer
k

PhpMimeType

public
12 stars
4 forks
0 issues

Commits

List of commits on branch master.
Unverified
d0f6d0982dcc1132c5ce847e2fc3e8a8ddb1bd67

Require PHP >= 5.6 not 5.6.0

kkatzien committed 8 years ago
Unverified
3adb79cf869129729ca4474fc10e71152d4cb330

Remove the nightly build from Travis

kkatzien committed 9 years ago
Unverified
ec13528fbe84918ed30d0376339a1600154d8954

Updated coveralls to 1.*

kkatzien committed 9 years ago
Unverified
101ccfb843490a02448fd57d8de62050596f3f22

Updated travis to run 2.0.0 against PHP 7 and README to better explain the differences in versions

kkatzien committed 9 years ago
Unverified
adf1e65150e770ad92df682a994f6dfb2503def9

Updated min required PHP version for v2.0.0

kkatzien committed 9 years ago
Unverified
d4b9d30c55b0e5c530e4ce101005855be81011ef

Added a changelog for v2

kkatzien committed 9 years ago

README

The README file for this repository.

PhpMimeType

A PHP library to detect the mime type of a file.

Build Status Coverage Status

Latest Stable Version Total Downloads

License

Not invented here

This is a modernised version of Jason Sheets's mimetype class.

Installation

To add the PhpMimeType library to your project run

composer require katzien/php-mime-type

from the directory where your composer.json file is.

See Packagist for more details.

Version Guidance

Version Status PHP version required
1.x Maintained min. 5.3
2.x Latest (recommended) min. 5.6

If you're using PHP 5.6 or higher, you should use the latest 2.x version. There is no difference in usage between 1.x and 2.x, so the upgrade should not require any code changes.

Differences between 1.x and 2.x:

  • syntax
  • versions of composer dependencies

Usage

$type = \MimeType\MimeType::getType('my-file.pdf'); // returns "application/pdf"