https://github.com/lamoda/gs1-barcode-parser
GS1 Datamatrix parser for PHP compatible with official GS1 documentation
https://github.com/lamoda/gs1-barcode-parser
gs1 php
Last synced: about 1 year ago
JSON representation
GS1 Datamatrix parser for PHP compatible with official GS1 documentation
- Host: GitHub
- URL: https://github.com/lamoda/gs1-barcode-parser
- Owner: lamoda
- License: mit
- Created: 2019-07-19T14:57:52.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2022-02-14T08:44:59.000Z (over 4 years ago)
- Last Synced: 2025-03-24T15:42:05.652Z (over 1 year ago)
- Topics: gs1, php
- Language: PHP
- Size: 18.6 KB
- Stars: 20
- Watchers: 16
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Lamoda GS1 Barcode parser and validator
=======================================
[](https://travis-ci.org/lamoda/gs1-barcode-parser)
[](https://scrutinizer-ci.com/g/lamoda/gs1-barcode-parser/?branch=master)
[](https://scrutinizer-ci.com/g/lamoda/gs1-barcode-parser/?branch=master)
[](https://scrutinizer-ci.com/g/lamoda/gs1-barcode-parser/build-status/master)
## Installation
### Composer
```sh
composer require lamoda/gs1-barcode-parser
```
## Description
This library provides parsing of GS1 Barcodes according to
[GS1 General specification](https://www.gs1.org/sites/default/files/docs/barcodes/GS1_General_Specifications.pdf)
and [GS1 DataMatrix Guideline](https://www.gs1.org/docs/barcodes/GS1_DataMatrix_Guideline.pdf).
Library also provides general purpose validator for barcode's content.
## Usage
### Parser
```php
parse($value);
// $barcode is an object of Barcode class
```
### Validator
```php
validate($value);
if ($resolution->isValid()) {
// ...
} else {
var_dump($resolution->getErrors());
}
```