nkamuo/gs1-barcode-parser 问题修复 & 功能扩展

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

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

nkamuo/gs1-barcode-parser

Composer 安装命令:

composer require nkamuo/gs1-barcode-parser

包简介

GS1 Barcode parser and validator compatible with official GS1 documentation

README 文档

README

Build Status Scrutinizer Code Quality Code Coverage Build Status

Installation

Composer

composer require nkamuo/gs1-barcode-parser

Description

This library provides parsing of GS1 Barcodes according to GS1 General specification and GS1 DataMatrix Guideline.

Library also provides general purpose validator for barcode's content.

Usage

Parser

<?php

$config = new \Nkamuo\GS1Parser\Parser\ParserConfig();
$parser = new \Nkamuo\GS1Parser\Parser\Parser($config);

$value = ']d201034531200000111719112510ABCD1234';

$barcode = $parser->parse($value);

// $barcode is an object of Barcode class

Validator

<?php

$parserConfig = new \Nkamuo\GS1Parser\Parser\ParserConfig();
$parser = new \Nkamuo\GS1Parser\Parser\Parser($parserConfig);

$validatorConfig = new \Nkamuo\GS1Parser\Validator\ValidatorConfig();
$validator = new \Nkamuo\GS1Parser\Validator\Validator($parser, $validatorConfig);

$value = ']d201034531200000111719112510ABCD1234';

$resolution = $validator->validate($value);

if ($resolution->isValid()) {
    // ...
} else {
    var_dump($resolution->getErrors());
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固