131. Class

131.1. Zend\Validator\Barcode\AbstractAdapter

131.1.1. Methods

131.1.1.1. hasValidLength

hasValidLength()

Checks the length of a barcode

Parameters:string – The barcode to check for proper length
Return type:bool

131.1.1.2. hasValidCharacters

hasValidCharacters()

Checks for allowed characters within the barcode

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

131.1.1.3. hasValidChecksum

hasValidChecksum()

Validates the checksum

Parameters:string – The barcode to check the checksum for
Return type:bool

131.1.1.4. getLength

getLength()

Returns the allowed barcode length

Return type:int|array

131.1.1.5. getCharacters

getCharacters()

Returns the allowed characters

Return type:integer|string|array

131.1.1.6. getChecksum

getChecksum()

Returns the checksum function name

131.1.1.7. setChecksum

setChecksum()

Sets the checksum validation method

Parameters:callable – Checksum method to call
Return type:AbstractAdapter

131.1.1.8. useChecksum

useChecksum()

Sets the checksum validation, if no value is given, the actual setting is returned

Parameters:bool
Return type:AbstractAdapter|bool

131.1.1.9. setLength

setLength()

Sets the length of this barcode

Parameters:int|array
Return type:AbstractAdapter

131.1.1.10. setCharacters

setCharacters()

Sets the allowed characters of this barcode

Parameters:integer
Return type:AbstractAdapter

131.1.1.11. gtin

gtin()

Validates the checksum (Modulo 10) GTIN implementation factor 3

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

131.1.1.12. identcode

identcode()

Validates the checksum (Modulo 10) IDENTCODE implementation factors 9 and 4

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

131.1.1.13. code25

code25()

Validates the checksum (Modulo 10) CODE25 implementation factor 3

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

131.1.1.14. postnet

postnet()

Validates the checksum () POSTNET implementation

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