vertilia/mime-type
Composer 安装命令:
composer require vertilia/mime-type
包简介
Simple library to abstract mime types
README 文档
README
Simple library to provide common interface for encoding / decoding MIME types.
<?php use Vertilia\MimeType\MimeTime; print_r(MimeTime::get('application/json')->decode('{"a":[1,2,3]}', JSON_OBJECT_AS_ARRAY)); print_r(MimeTime::get('application/x-www-form-urlencoded')->decode('a[]=1&a[]=2&a[]=3'));
Both calls from the above snippet first return the object corresponding to provided MIME type, and then they decode the content of that MIME type with the same resulting array.
Both calls display the same result:
Array
(
[a] => Array
(
[0] => 1
[1] => 2
[2] => 3
)
)
统计信息
- 总下载量: 72
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-2-Clause
- 更新时间: 2020-04-26