Methods

Returns the allowed characters

getCharacters() : int | string | array

Returns

intstringarray

Returns the checksum function name

getChecksum() : bool

Returns

bool

Returns the allowed barcode length

getLength() : int | array

Returns

intarray

Checks for allowed characters within the barcode

hasValidCharacters(string $value) : bool

Parameters

$value

string

The barcode to check for allowed characters

Returns

bool

Validates the checksum

hasValidChecksum(string $value) : bool

Parameters

$value

string

The barcode to check the checksum for

Returns

bool

Checks the length of a barcode

hasValidLength(string $value) : bool

Parameters

$value

string

The barcode to check for proper length

Returns

bool

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

useChecksum(bool $check) : \Zend\Validator\Barcode\AbstractAdapter | bool

Parameters

$check

bool

Returns

Validates the checksum (Modulo 10) CODE25 implementation factor 3

code25(string $value) : bool

Parameters

$value

string

The barcode to validate

Returns

bool

Validates the checksum (Modulo 10) GTIN implementation factor 3

gtin(string $value) : bool

Parameters

$value

string

The barcode to validate

Returns

bool

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

identcode(string $value) : bool

Parameters

$value

string

The barcode to validate

Returns

bool

Validates the checksum () POSTNET implementation

postnet(string $value) : bool

Parameters

$value

string

The barcode to validate

Returns

bool

Sets the allowed characters of this barcode

setCharacters(int $characters) : \Zend\Validator\Barcode\AbstractAdapter

Parameters

$characters

int

Returns

Sets the checksum validation method

setChecksum(\Zend\Validator\Barcode\callable $checksum) : \Zend\Validator\Barcode\AbstractAdapter

Parameters

$checksum

\Zend\Validator\Barcode\callable

Checksum method to call

Returns

Sets the length of this barcode

setLength(int | array $length) : \Zend\Validator\Barcode\AbstractAdapter

Parameters

$length

intarray

Returns

 Properties

 

Allowed options for this adapter

$options : array