maxwellmezadre/code-reader
最新稳定版本:v1.0.0
Composer 安装命令:
composer require maxwellmezadre/code-reader
包简介
A PHP package that provides an interface to the zbar bar-code reading library.
README 文档
README
A PHP package that provides an interface to the zbar bar-code reading library.
Installation
You can install the package via composer:
composer require maxwellmezadre/code-reader
Usage
This package can be used in two ways: through the CodeReaderFacade for a simple, static interface, or by instantiating the CodeReader class directly for more control.
Using the Facade (Recommended)
The facade provides a quick and easy way to access the library's features.
use MaxwellMezadre\CodeReader\CodeReaderFacade as CodeReader; // Read all code values from an image $codes = CodeReader::read('/path/to/your/image.png'); // Read all code types $types = CodeReader::getTypes('/path/to/your/image.png'); // Get detailed information (value and type) for all codes $details = CodeReader::getDetails('/path/to/your/image.png');
Using the Class Instance
For more advanced use cases, you can instantiate the CodeReader class directly.
use MaxwellMezadre\CodeReader\CodeReader; $reader = new CodeReader('/path/to/your/image.png'); // Get all code values $codes = $reader->codes(); // Get all code types $types = $reader->types(); // Get detailed information $details = $reader->details(); // Returns a Code object or an array of Code objects.
Testing
composer test
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-06-27