PHP Classes

How to Use a PHP EAN Validator to Check If Barcode Digits Are Correct Using the Package PHP EAN Utils: Validate EAN code strings

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-12-20 (8 days ago) RSS 2.0 feedNot enough user ratingsTotal: 16 This week: 16All time: 11,410 This week: 3Up
Version License PHP version Categories
php-ean-utils 1.0Custom (specified...7Algorithms, E-Commerce, Validation, P...
Description 

Author

This package can validate EAN code strings.

It can take an EAN code as a text string and check its validity.

It can check the EAN code digits 8 and 13 to perform the validation.

Picture of Celso
Name: Celso <contact>
Classes: 3 packages by
Country: Brazil Brazil
Innovation award
Innovation award
Nominee: 2x

Documentation

EANs Utility for PHP - by Celso Nery

A package utility to work with EANs/GTINs, for validate and generate fake EANs

Maintainer PHP from Packagist Latest Version Software License Build Quality Score Total Downloads

Installation

This package available by Composer:

"celsonery/php-ean-utils": "^1.3"

or run

composer require celsonery/php-ean-utils

How to use

In your class import this trait

use CelsoNery\EanUtils\Services\Traits\EanUtil;

class YourClassName
{
    use EanUtil;
    
    public function yourMethod()
    {
        if ($this->isValid("7898114289779")) {
            // Do something
        }
    }
}

Contributing

Please see CONTRIBUTING for details.

Support

Security: If you discover any security related issues, please email celso.nery@gmail.com instead of using the issue tracker.

Thank you

Credits

License

The MIT License (MIT). Please see License File for more information.


  Files folder image Files (9)  
File Role Description
Files folder image.github (1 directory)
Files folder imagesrc (1 directory)
Files folder imagetests (1 directory)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (9)  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files (9)  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file ean-utils.yml Data Auxiliary data

  Files folder image Files (9)  /  src  
File Role Description
Files folder imageServices (1 directory)

  Files folder image Files (9)  /  src  /  Services  
File Role Description
Files folder imageTraits (1 file)

  Files folder image Files (9)  /  src  /  Services  /  Traits  
File Role Description
  Plain text file EanUtil.php Class Class source

  Files folder image Files (9)  /  tests  
File Role Description
Files folder imageUnit (1 file)

  Files folder image Files (9)  /  tests  /  Unit  
File Role Description
  Plain text file EanUtilTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:16
This week:16
All time:11,410
This week:3Up