innmind/media-type
最新稳定版本:3.1.0
Composer 安装命令:
composer require innmind/media-type
包简介
Model of media types
关键字:
README 文档
README
Model to validate media types (follows RFC6838).
Installation
composer install innmind/media-type
Usage
use Innmind\MediaType\MediaType; $type = MediaType::of('application/json+some-extension; charset=utf-8'); $type->topLevel(); // application $type->subType(); // json $type->suffix(); // some-extension $type->parameters()->first()->name(); // charset $type->parameters()->first()->value(); // utf-8 $type->toString(); // application/json+some-extension; charset=utf-8
If the values are incorrect it will throw an exception. Or you can use MediaType::maybe() that will return an instance of Innmind\Immutable\Maybe.
统计信息
- 总下载量: 93.39k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-12-14