Table of contents
Namespace: Com\Tecnick\Barcode\Type\Square\QrCode
class Data
Source: src/Type/Square/QrCode/Data.php:40
Symbol tables for the QrCode Barcode type class.
Only the tables ISO/IEC 18004 states without a rule that generates them are held here. The codeword capacity of Table 1, the alignment pattern positions, the format information of Table C.1, the version information of Table D.1 and the data mask patterns of Table 10 all follow from a stated rule and are computed in Encode.
Constants
ALIGN_CENTRES
Row and column coordinates of the centre module of the alignment patterns, Table E.1 of ISO/IEC 18004, by version. An alignment pattern is centred on every pair of coordinates except the three that the finder patterns cover. Version 1 carries no alignment pattern.
public const ALIGN_CENTRES = [1 => [], 2 => [6, 18], 3 => [6, 22], 4 => [6, 26], 5 => [6, 30], 6 => [6, 34], 7 => [6, 22, 38], 8 => [6, 24, 42], 9 => [6, 26, 46], 10 => [6, 28, 50], 11 => [6, 30, 54], 12 => [6, 32, 58], 13 => [6, 34, 62], 14 => [6, 26, 46, 66], 15 => [6, 26, 48, 70], 16 => [6, 26, 50, 74], 17 => [6, 30, 54, 78], 18 => [6, 30, 56, 82], 19 => [6, 30, 58, 86], 20 => [6, 34, 62, 90], 21 => [6, 28, 50, 72, 94], 22
// … truncated, see source
Source: src/Type/Square/QrCode/Data.php:210
AN_CHARS
Alphanumeric character set of Table 5 of ISO/IEC 18004. The value of a character is its position in this string.
public const AN_CHARS = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'
Source: src/Type/Square/QrCode/Data.php:145
COUNT_BITS
Size in bits of the character count indicator, Table 3 of ISO/IEC 18004, by version group and encodation mode. The three version groups are the versions 1 to 9, 10 to 26 and 27 to 40.
public const COUNT_BITS = [[10, 9, 8, 8], [12, 11, 16, 10], [14, 13, 16, 12]]
Source: src/Type/Square/QrCode/Data.php:112
COUNT_GROUP_MAX
Highest version of each version group of COUNT_BITS.
public const COUNT_GROUP_MAX = [9, 26, 40]
Source: src/Type/Square/QrCode/Data.php:123
ECC_BLOCKS
Error correction characteristics of Table 9 of ISO/IEC 18004, by version and error correction level: the number of error correction codewords per block, and the number of blocks.
Table 9 also states the (c, k, r) code of each block. It follows from these two numbers and the codeword capacity of the version, because the data codewords are shared out over the blocks as evenly as possible, so it is computed in Encode::getBlockSizes() rather than tabulated.
public const ECC_BLOCKS = [1 => [[7, 1], [10, 1], [13, 1], [17, 1]], 2 => [[10, 1], [16, 1], [22, 1], [28, 1]], 3 => [[15, 1], [26, 1], [18, 2], [22, 2]], 4 => [[20, 1], [18, 2], [26, 2], [16, 4]], 5 => [[26, 1], [24, 2], [18, 4], [22, 4]], 6 => [[18, 2], [16, 4], [24, 4], [28, 4]], 7 => [[20, 2], [18, 4], [18, 6], [26, 5]], 8 => [[24, 2], [22, 4], [22, 6], [26, 6]], 9 => [[30, 2], [22, 5], [20, 8], [24, 8]], 10 => [[18, 4
// … truncated, see source
Source: src/Type/Square/QrCode/Data.php:159
ECC_INDICATOR
Error correction level indicators of Table 12 of ISO/IEC 18004, by level.
public const ECC_INDICATOR = [0b1, 0b0, 0b11, 0b10]
Source: src/Type/Square/QrCode/Data.php:137
ECC_LEVELS
Error correction levels in the order of ECC_INDICATOR and ECC_BLOCKS.
public const ECC_LEVELS = ['L' => 0, 'M' => 1, 'Q' => 2, 'H' => 3]
Source: src/Type/Square/QrCode/Data.php:130
FORMAT_GENERATOR
Generator polynomial of the BCH (15, 5) code of the format information, x^10 + x^8 + x^5 + x^4 + x^2 + x + 1, Annex C of ISO/IEC 18004.
public const FORMAT_GENERATOR = 0b10100110111
Source: src/Type/Square/QrCode/Data.php:279
FORMAT_MASK
Mask applied to the format information, section 7.9.1 of ISO/IEC 18004.
public const FORMAT_MASK = 0b101010000010010
Source: src/Type/Square/QrCode/Data.php:286
KANJI_RANGES
Shift JIS ranges of the kanji mode, section 7.4.6 of ISO/IEC 18004: the first and the last value of the range, and the value subtracted from a character of it.
public const KANJI_RANGES = [[0x8140, 0x9ffc, 0x8140], [0xe040, 0xebbf, 0xc140]]
Source: src/Type/Square/QrCode/Data.php:260
MODE_ALPHANUM
Alphanumeric encodation mode.
public const MODE_ALPHANUM = 1
Source: src/Type/Square/QrCode/Data.php:68
MODE_BITS
Size in bits of the mode indicator, Table 2 of ISO/IEC 18004.
public const MODE_BITS = 4
Source: src/Type/Square/QrCode/Data.php:96
MODE_BYTE
Byte encodation mode.
public const MODE_BYTE = 2
Source: src/Type/Square/QrCode/Data.php:75
MODE_INDICATOR
Mode indicators of Table 2 of ISO/IEC 18004, by encodation mode.
public const MODE_INDICATOR = [0b1, 0b10, 0b100, 0b1000]
Source: src/Type/Square/QrCode/Data.php:89
MODE_KANJI
Kanji encodation mode.
public const MODE_KANJI = 3
Source: src/Type/Square/QrCode/Data.php:82
MODE_NUMERIC
Numeric encodation mode.
public const MODE_NUMERIC = 0
Source: src/Type/Square/QrCode/Data.php:61
N1
Penalty points of a run of more than five modules of the same colour in a row or a column, Table 11 of ISO/IEC 18004.
public const N1 = 3
Source: src/Type/Square/QrCode/Data.php:310
N2
Penalty points of a two by two block of modules of the same colour, Table 11 of ISO/IEC 18004.
public const N2 = 3
Source: src/Type/Square/QrCode/Data.php:318
N3
Penalty points of a 1:1:3:1:1 pattern next to four light modules, Table 11 of ISO/IEC 18004.
public const N3 = 40
Source: src/Type/Square/QrCode/Data.php:326
N4
Penalty points of each five percent by which the proportion of dark modules departs from one half, Table 11 of ISO/IEC 18004.
public const N4 = 10
Source: src/Type/Square/QrCode/Data.php:334
PAD_CODEWORDS
Pad codewords of section 7.4.10 of ISO/IEC 18004, applied in turn to fill the data capacity.
public const PAD_CODEWORDS = [0xec, 0x11]
Source: src/Type/Square/QrCode/Data.php:271
TERMINATOR_BITS
Size in bits of the terminator, Table 2 of ISO/IEC 18004.
public const TERMINATOR_BITS = 4
Source: src/Type/Square/QrCode/Data.php:103
VERSION_GENERATOR
Generator polynomial of the BCH (18, 6) code of the version information, x^12 + x^11 + x^10 + x^9 + x^8 + x^5 + x^2 + 1, Annex D of ISO/IEC 18004.
public const VERSION_GENERATOR = 0b1111100100101
Source: src/Type/Square/QrCode/Data.php:294
VERSION_INFO_MIN
Lowest version that carries the version information, section 7.10 of ISO/IEC 18004.
public const VERSION_INFO_MIN = 7
Source: src/Type/Square/QrCode/Data.php:302
VERSION_MAX
Highest symbol version.
public const VERSION_MAX = 40
Source: src/Type/Square/QrCode/Data.php:54
VERSION_MIN
Lowest symbol version.
public const VERSION_MIN = 1