141. Class

141.1. Zend\Validator\Barcode\Code128

141.1.1. Methods

141.1.1.1. __construct

__construct()

Constructor for this barcode adapter

141.1.1.2. setUtf8StringWrapper

setUtf8StringWrapper()

141.1.1.3. getUtf8StringWrapper

getUtf8StringWrapper()

Get the string wrapper supporting UTF-8 character encoding

Return type:StringWrapperInterface

141.1.1.4. hasValidCharacters

hasValidCharacters()

Checks for allowed characters within the barcode

Parameters:string – The barcode to check for allowed characters
Return type:bool

141.1.1.5. code128

code128()

Validates the checksum ()

Parameters:string – The barcode to validate
Return type:bool

141.1.1.6. getCodingSet

getCodingSet()

Returns the coding set for a barcode

Parameters:string – Barcode
Return type:string

141.1.1.7. ord128

ord128()

Internal method to return the code128 integer from an ascii value

Table A
ASCII CODE128
32 to 95 == 0 to 63
0 to 31 == 64 to 95

128 to 138 == 96 to 106

Table B
ASCII CODE128

32 to 138 == 0 to 106

Table C
ASCII CODE128
“00” to “99” == 0 to 99
132 to 138 == 100 to 106
Parameters:
  • string
  • string
Return type:

integer

141.1.1.8. chr128

chr128()

Internal Method to return the ascii value from an code128 integer

Table A
ASCII CODE128
32 to 95 == 0 to 63
0 to 31 == 64 to 95

128 to 138 == 96 to 106

Table B
ASCII CODE128

32 to 138 == 0 to 106

Table C
ASCII CODE128
“00” to “99” == 0 to 99
132 to 138 == 100 to 106
Parameters:
  • integer
  • string
Return type:

string