This package is abandoned and no longer maintained. No replacement package was suggested.

Media Type

v0.1.0 2019-06-24 10:44 UTC

This package is auto-updated.

Last update: 2020-04-10 16:14:07 UTC


Build Status

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