定制 neoncitylights/data-url 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

neoncitylights/data-url

最新稳定版本:v3.0.0

Composer 安装命令:

composer require neoncitylights/data-url

包简介

Allows working with data URLs as entity objects in PHP

README 文档

README

Packagist License Docs CI Code coverage

A small PHP library for dealing with data URLs, which contain a media type and an encoded base64 string.

This library fully conforms to RFC 2397.

Install

This requires a minimum PHP version of v8.2.

composer require neoncitylights/data-url 

Usage

<?php use Neoncitylights\DataUrl\DataUrlParser; use Neoncitylights\MediaType\MediaTypeParser; $dataUrlParser = new DataUrlParser( new MediaTypeParser() ); $dataUrl = $dataUrlParser->parseOrNull( 'data:text/plain;base64,VGhlIGZpdmUgYm94aW5nIHdpemFyZHMganVtcCBxdWlja2x5Lg==' ); print( $dataUrl->getMediaType()->getEssence() ); // 'text/plain' print( $dataUrl->getData() ); // `VGhlIGZpdmUgYm94aW5nIHdpemFyZHMganVtcCBxdWlja2x5Lg==` print( $dataUrl->getDecodedValue() ); // 'The five boxing wizards jump quickly.'

License

This software is licensed under the MIT license (LICENSE or https://opensource.org/license/mit/).

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the MIT license, shall be licensed as above, without any additional terms or conditions.

统计信息

  • 总下载量: 13.59k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固