libero / media-type
This package is abandoned and no longer maintained.
No replacement package was suggested.
Media Type
v0.1.0
2019-06-24 10:44 UTC
Requires
- php: ^7.2
- symfony/polyfill-mbstring: ^1.0
Requires (Dev)
- daverandom/exceptional-json: ^1.0
- libero/coding-standard: ^0.5
- phpstan/phpstan: ^0.11
- phpstan/phpstan-phpunit: ^0.11
- phpunit/phpunit: ^8.1
- symfony/filesystem: ^4.3
- symfony/finder: ^4.3
This package is auto-updated.
Last update: 2020-04-10 16:14:07 UTC
README
The is a library for parsing and serializing media types based on the WHATWG MIME Sniffing standard.
Getting started
Using Composer you can install the library into your project:
composer require libero/media-type
Basic usage
use Libero\MediaType\MediaType; $mediaType = MediaType::fromString('text/html; Charset="utf-8"'); $mediaType->getEssence(); // 'text/html' $mediaType->getParameters(); // ['charset' => 'utf-8'] (string) $mediaType; // 'text/html;charset=utf-8'
Getting help
- Report a bug or request a feature on GitHub.
- Ask a question on the Libero Community Slack.
- Read the code of conduct.