php-extended/php-mime-type-provider-iana

This package is abandoned and no longer maintained. The author suggests using the php-extended/php-mime-type-object package instead.

A mime type provider implementation based on the iana list of mime types


README

A mime type provider implementation based on the iana list of mime types.

coverage build status

This library uses the https://www.iana.org/assignments/media-types/media-types.xhtml source file to update its contents. This library is updated once a week, every sunday.

Last Updated Date : 2021-06-20

Installation

The installation of this library is made via composer. Download composer.phar from their website. Then add to your composer.json :

	"require": {
		...
		"php-extended/php-mime-type-provider-iana": "^3",
		...
	}

Then run php composer.phar update to install this library. The autoloading of all classes of this library is made through composer's autoloader.

Basic Usage

You may use this library the following way:


use PhpExtended\MimeType\IanaMimeTypeProvider;

$provider = new IanaMimeTypeProvider();

$mimeType = $provider->getExactMimeType('text/html');
// returns a MimeTypeInterface object

License

MIT (See license file