Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Ean8.php
Go to the documentation of this file.
1 <?php
25 #require_once 'Zend/Validate/Barcode/AdapterAbstract.php';
26 
34 {
39  protected $_length = array(7, 8);
40 
45  protected $_characters = '0123456789';
46 
51  protected $_checksum = '_gtin';
52 
59  public function checkLength($value)
60  {
61  if (strlen($value) == 7) {
62  $this->setCheck(false);
63  } else {
64  $this->setCheck(true);
65  }
66 
67  return parent::checkLength($value);
68  }
69 }
$value
Definition: gender.phtml:16