php-extended/php-mime-type-provider-apache

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 apache list of mime types


README

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

coverage build status

This library uses the https://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types 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-apache": "^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\ApacheMimeTypeProvider;

$provider = new ApacheMimeTypeProvider();

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

License

MIT (See license file).