FormatInformation
in package
Encapsulates a QR Code's format information, including the data mask used and error correction level.
Tags
Table of Contents
- DECODE_LOOKUP = [[0x0, 0x5412], [0x1, 0x5125], [0x2, 0x5e7c], [0x3, 0x5b4b], [0x4, 0x45f9], [0x5, 0x40ce], [0x6, 0x4f97], [0x7, 0x4aa0], [0x8, 0x77c4], [0x9, 0x72f3], [0xa, 0x7daa], [0xb, 0x789d], [0xc, 0x662f], [0xd, 0x6318], [0xe, 0x6c41], [0xf, 0x6976], [0x10, 0x1689], [0x11, 0x13be], [0x12, 0x1ce7], [0x13, 0x19d0], [0x14, 0x762], [0x15, 0x255], [0x16, 0xd0c], [0x17, 0x83b], [0x18, 0x355f], [0x19, 0x3068], [0x1a, 0x3f31], [0x1b, 0x3a06], [0x1c, 0x24b4], [0x1d, 0x2183], [0x1e, 0x2eda], [0x1f, 0x2bed]]
- See ISO 18004:2006, Annex C, Table C.1
- FORMAT_INFO_MASK_QR = 0x5412
- $errorCorrectionLevel : int
- The current ECC level value
- $maskPattern : int
- The current mask pattern (0-7)
- __construct() : mixed
- Receives the format information from a parsed QR Code, detects ECC level and mask pattern
- getErrorCorrectionLevel() : EccLevel
- Returns and EccLevel instance ith the detected ECC level set
- getMaskPattern() : MaskPattern
- Returns a MaskPattern instance with the detected mask pattern set
Constants
DECODE_LOOKUP
See ISO 18004:2006, Annex C, Table C.1
public
mixed
DECODE_LOOKUP
= [[0x0, 0x5412], [0x1, 0x5125], [0x2, 0x5e7c], [0x3, 0x5b4b], [0x4, 0x45f9], [0x5, 0x40ce], [0x6, 0x4f97], [0x7, 0x4aa0], [0x8, 0x77c4], [0x9, 0x72f3], [0xa, 0x7daa], [0xb, 0x789d], [0xc, 0x662f], [0xd, 0x6318], [0xe, 0x6c41], [0xf, 0x6976], [0x10, 0x1689], [0x11, 0x13be], [0x12, 0x1ce7], [0x13, 0x19d0], [0x14, 0x762], [0x15, 0x255], [0x16, 0xd0c], [0x17, 0x83b], [0x18, 0x355f], [0x19, 0x3068], [0x1a, 0x3f31], [0x1b, 0x3a06], [0x1c, 0x24b4], [0x1d, 0x2183], [0x1e, 0x2eda], [0x1f, 0x2bed]]
[data bits, sequence after masking]
FORMAT_INFO_MASK_QR
public
mixed
FORMAT_INFO_MASK_QR
= 0x5412
Properties
$errorCorrectionLevel
The current ECC level value
private
int
$errorCorrectionLevel
L: 0b01 M: 0b00 Q: 0b11 H: 0b10
$maskPattern
The current mask pattern (0-7)
private
int
$maskPattern
Methods
__construct()
Receives the format information from a parsed QR Code, detects ECC level and mask pattern
public
__construct(int $formatInfo) : mixed
Parameters
- $formatInfo : int
Return values
mixed —getErrorCorrectionLevel()
Returns and EccLevel instance ith the detected ECC level set
public
getErrorCorrectionLevel() : EccLevel
Return values
EccLevel —getMaskPattern()
Returns a MaskPattern instance with the detected mask pattern set
public
getMaskPattern() : MaskPattern