Skip to content

tzhmbtv/php-dmtx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-dmtx

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.

About

A datamatrix R/W based on libdmtx

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%