evought/data-uri
最新稳定版本:v1.0
Composer 安装命令:
composer require evought/data-uri
包简介
A convenient class for working with Data URIs in PHP.
README 文档
README
README.md
Eric Vought
2015-01-25 DataURI PHP library
#What This Project Is#
The DataUri class provides a convenient way to access and construct data URIs, but should not be relied upon for enforcing RFC 2397 standards.
This class will not:
- Validate the media-type provided/parsed
- Validate the encoded data provided/parsed
Examples of how to use the class are in FlyingTopHat's blog post, "Using Data URI's in PHP".
#Source and History#
DataURI is a class originally written by FlyTopHat and was used as an example in a 2012 blog post and as a Gist.
In 2014, I forked the Gist in order to package it as a micro-library for use by Composer as a dependency in other projects. Using a Gist-based micro-library in composer requires creating a custom VCS-based repository in your composer.json. This is clunky but acceptable in an application but becomes difficult if the host project is itself used as a Composer-dependency because the custom repository definition is not (by design) included in the host project. The repository definition and package requirement must be repeated in each enclosing project--- effectively defeating the purpose of automatic dependency management.
So, in 2015, I forked my fork of DataURI, this time to move it to a full-fledged GitHub repository so that it could be made into an actual composer-managed library in the Packagist repository and the extra machinery needed to turn it into a production component could be added.
#Licensing#
All components are under an MIT license. FlyingTopHat added an MIT license to the original GIST on 2 February 2015 to clarify original license.
统计信息
- 总下载量: 9.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-03