maxwellmezadre/code-reader

A PHP package that provides an interface to the zbar bar-code reading library.

Maintainers

Package info

github.com/maxwellmezadre/code-reader

pkg:composer/maxwellmezadre/code-reader

Statistics

Installs: 7

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2025-06-27 19:39 UTC

This package is auto-updated.

Last update: 2026-03-27 21:33:50 UTC


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.