承接 rebuy/ean-isbn-library 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

rebuy/ean-isbn-library

最新稳定版本:v1.1.0

Composer 安装命令:

composer require rebuy/ean-isbn-library

包简介

A PHP library for EAN and ISBN validation and conversion

README 文档

README

A PHP library for validating and converting EAN and ISBN identifiers licensed under the MIT license.

Installation

To use the library you need PHP 7.1 and Composer. Add the following entry to your composer.json.

composer require rebuy/ean-isbn-library

Usage

The core of the library are identifier objects representing valid EAN-13, EAN-8, or ISBN-10 identifiers. Identifier objects can be created using a parser which validates and normalizes the identifier string.

$parser = new Parser();
$identifier = $parser->parse('978-0091956141');

echo $identifier; // will print '9780091956141'

Once you have an identifier object, you can convert it into an alternate representation if available.

$converter = new Converter();
$conversion = $converter->convert($identifier);
echo $conversion; // will print '0091956145'

Both parsers and converters will throw exceptions if the action can’t be performed. Go to examples for complete executable examples and docs for a full API reference.

Troubleshooting

  • If you come across errors or bugs please feel free to report them by opening an issue here but please check open issues before you do in case someone already created one.

Contributing

Feel free to open an issue if you find bugs or if you're missing functionality that should be included.

Pull requests for additional features are welcome as long as they fit the requirements detailed under CONTRIBUTING.

统计信息

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

GitHub 信息

  • Stars: 5
  • Watchers: 30
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-11-26