1987. Class

1987.1. Zend\Validator\Barcode

1987.1.1. Methods

1987.1.1.1. __construct

__construct()

Constructor for barcodes

Parameters:array|string – Options to use

1987.1.1.2. getAdapter

getAdapter()

Returns the set adapter

Return type:BarcodeAbstractAdapter

1987.1.1.3. setAdapter

setAdapter()

Sets a new barcode adapter

Parameters:
  • string|BarcodeAbstractAdapter – Barcode adapter to use
  • array – Options for this adapter
Return type:

Barcode

Throws :

ExceptionInvalidArgumentException

1987.1.1.4. getChecksum

getChecksum()

Returns the checksum option

Return type:string

1987.1.1.5. useChecksum

useChecksum()

Sets if checksum should be validated, if no value is given the actual setting is returned

Parameters:bool
Return type:bool

1987.1.1.6. isValid

isValid()

Defined by ZendValidatorValidatorInterface

Returns true if and only if $value contains a valid barcode

Parameters:string
Return type:bool

1987.1.2. Constants

1987.1.2.1. INVALID

1987.1.2.2. FAILED

1987.1.2.3. INVALID_CHARS

1987.1.2.4. INVALID_LENGTH