Methods

Constructor for this barcode adapter

__construct() 

Returns the allowed characters

getCharacters() : int | string | array
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::getCharacters()

Returns

intstringarray

Returns the checksum function name

getChecksum() : bool
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::getChecksum()

Returns

bool

Returns the allowed barcode length

getLength() : int | array
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::getLength()

Returns

intarray

Get the string wrapper supporting UTF-8 character encoding

getUtf8StringWrapper() : \Zend\Stdlib\StringWrapper\StringWrapperInterface

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
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::hasValidChecksum()

Parameters

$value

string

The barcode to check the checksum for

Returns

bool

Checks the length of a barcode

hasValidLength(string $value) : bool
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::hasValidLength()

Parameters

$value

string

The barcode to check for proper length

Returns

bool

setUtf8StringWrapper()

setUtf8StringWrapper(\Zend\Stdlib\StringWrapper\StringWrapperInterface $utf8StringWrapper) 

Parameters

$utf8StringWrapper

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

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

inherited_from \Zend\Validator\Barcode\AbstractAdapter::useChecksum()

Parameters

$check

bool

Returns

Internal Method to return the ascii value from a code128 integer

chr128(int $value, string $set) : string

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

$value

int

$set

string

Returns

string

Validates the checksum ()

code128(string $value) : bool

Parameters

$value

string

The barcode to validate

Returns

bool

Validates the checksum (Modulo 10) CODE25 implementation factor 3

code25(string $value) : bool
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::code25()

Parameters

$value

string

The barcode to validate

Returns

bool

Returns the coding set for a barcode

getCodingSet(string $value) : string

Parameters

$value

string

Barcode

Returns

string

Validates the checksum (Modulo 10) GTIN implementation factor 3

gtin(string $value) : bool
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::gtin()

Parameters

$value

string

The barcode to validate

Returns

bool

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

identcode(string $value) : bool
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::identcode()

Parameters

$value

string

The barcode to validate

Returns

bool

Internal method to return the code128 integer from an ascii value

ord128(string $value, string $set) : int

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

$value

string

$set

string

Returns

int

Validates the checksum () POSTNET implementation

postnet(string $value) : bool
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::postnet()

Parameters

$value

string

The barcode to validate

Returns

bool

Sets the allowed characters of this barcode

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

inherited_from \Zend\Validator\Barcode\AbstractAdapter::setCharacters()

Parameters

$characters

int

Returns

Sets the checksum validation method

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

inherited_from \Zend\Validator\Barcode\AbstractAdapter::setChecksum()

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
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::setLength()

Parameters

$length

intarray

Returns

 Properties

 

Allowed options for this adapter

$options : array
Inherited

inherited_from \Zend\Validator\Barcode\AbstractAdapter::$$options
 

The used string wrapper used for basic UTF-8 string functions

$utf8StringWrapper : \Zend\Stdlib\StringWrapper\StringWrapperInterface