AdapterInterface
in
Table of Contents
Methods
- getCharacters() : int|string|array<string|int, mixed>
- Returns the allowed characters
- getChecksum() : bool|int|string
- Returns if barcode uses a checksum
- getLength() : int|array<string|int, mixed>
- Returns the allowed barcode length
- hasValidCharacters() : bool
- Checks for allowed characters within the barcode
- hasValidChecksum() : bool
- Validates the checksum
- hasValidLength() : bool
- Checks the length of a barcode
- useChecksum() : AbstractAdapter|bool
- Sets the checksum validation, if no value is given, the actual setting is returned
Methods
getCharacters()
Returns the allowed characters
public
getCharacters() : int|string|array<string|int, mixed>
Return values
int|string|array<string|int, mixed>getChecksum()
Returns if barcode uses a checksum
public
getChecksum() : bool|int|string
Return values
bool|int|stringgetLength()
Returns the allowed barcode length
public
getLength() : int|array<string|int, mixed>
Return values
int|array<string|int, mixed>hasValidCharacters()
Checks for allowed characters within the barcode
public
hasValidCharacters(string $value) : bool
Parameters
- $value : string
-
The barcode to check for allowed characters
Return values
boolhasValidChecksum()
Validates the checksum
public
hasValidChecksum(string $value) : bool
Parameters
- $value : string
-
The barcode to check the checksum for
Return values
boolhasValidLength()
Checks the length of a barcode
public
hasValidLength(string $value) : bool
Parameters
- $value : string
-
The barcode to check for proper length
Return values
booluseChecksum()
Sets the checksum validation, if no value is given, the actual setting is returned
public
useChecksum([bool $check = null ]) : AbstractAdapter|bool
Parameters
- $check : bool = null