php-extended / php-mime-type-parser-object
This package is abandoned and no longer maintained.
The author suggests using the php-extended/php-mime-type-object package instead.
A library that implements the php-extended/php-mime-type-parser-interface library
3.0.9
2021-06-25 13:33 UTC
Requires
Requires (Dev)
README
A library that implements the php-extended/php-mime-type-parser-interface library.
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-parser-object": "^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
This library may be used the following way :
use PhpExtended\MimeType\MimeTypeParser;
$parser = new MimeTypeParser();
$type = $parser->parse('text/html');
// $type is now a MimeTypeInterface with value "html", and
// parent category as MimeCategoryInterface with value "text".
License
MIT (See license file).