Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Zend_Validate_Barcode_Upce Class Reference
Inheritance diagram for Zend_Validate_Barcode_Upce:
Zend_Validate_Barcode_AdapterAbstract Zend_Validate_Barcode_AdapterInterface

Public Member Functions

 checkLength ($value)
 
- Public Member Functions inherited from Zend_Validate_Barcode_AdapterAbstract
 checkLength ($value)
 
 checkChars ($value)
 
 checksum ($value)
 
 getLength ()
 
 getCharacters ()
 
 getChecksum ()
 
 getCheck ()
 
 setCheck ($check)
 

Protected Attributes

 $_length = array(6, 7, 8)
 
 $_characters = '0123456789'
 
 $_checksum = '_gtin'
 
- Protected Attributes inherited from Zend_Validate_Barcode_AdapterAbstract
 $_length
 
 $_characters
 
 $_checksum
 
 $_hasChecksum = true
 

Additional Inherited Members

- Protected Member Functions inherited from Zend_Validate_Barcode_AdapterAbstract
 _gtin ($value)
 
 _identcode ($value)
 
 _code25 ($value)
 
 _postnet ($value)
 

Detailed Description

Definition at line 33 of file Upce.php.

Member Function Documentation

◆ checkLength()

checkLength (   $value)

Overrides parent checkLength

Parameters
string$valueValue
Returns
boolean

Implements Zend_Validate_Barcode_AdapterInterface.

Definition at line 59 of file Upce.php.

60  {
61  if (strlen($value) != 8) {
62  $this->setCheck(false);
63  } else {
64  $this->setCheck(true);
65  }
66 
67  return parent::checkLength($value);
68  }
$value
Definition: gender.phtml:16

Field Documentation

◆ $_characters

$_characters = '0123456789'
protected

Definition at line 45 of file Upce.php.

◆ $_checksum

$_checksum = '_gtin'
protected

Definition at line 51 of file Upce.php.

◆ $_length

$_length = array(6, 7, 8)
protected

Definition at line 39 of file Upce.php.


The documentation for this class was generated from the following file: