tzhmbtv/php-dmtx 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

tzhmbtv/php-dmtx

Composer 安装命令:

composer require tzhmbtv/php-dmtx

包简介

Datamatrix reader/writer based on libdmtx with support for PHP 8.x

README 文档

README

Note: This is a fork of the original ptachoire/php-dmtx project with added support for newer PHP versions and PHPUnit 10.x compatibility.

Datamatrix reader/writer based on libdmtx.

⚠️ The installation of dmtx-utils is required to use the lib.

Install

composer require "tzhmbtv/php-dmtx:*"

Usage

use Dmtx\Writer;

$writer = new Writer();

//encode message into file
$writer->encode('this is a message')
    ->saveAs('/tmp/image.png');

//encode message and output image 
echo $writer->encode('this is a message')
    ->dump();
use Dmtx\Reader;

$reader = new Reader();

//decode message from data
$reader->decode($encoded_value);

//decode message from file 
echo $reader->decodeFile('/tmp/image.png');

Test

composer install
./vendor/bin/phpunit

Compatibility

This fork is compatible with:

  • PHP 8.2 or higher
  • PHPUnit 10.x
  • Symfony 3.4, 4.x, 5.x, 6.x, and 7.x packages

Requirements

  • PHP 8.2 or higher
  • dmtx-utils must be installed on your system

Credits

Project structure inspired by Negotiation by willdurand.

Original package created by ptachoire.

Maintained by elnur9924 @tzhmbtv.

License

php-dmtx is released under the MIT License. See the bundled LICENSE file for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-03-12