Data

Data for Aztec Barcode type class

Namespace: Com\Tecnick\Barcode\Type\Square\Aztec

class Data

Source: src/Type/Square/Aztec/Data.php:34

Data for Aztec Barcode type class

Constants

CHAR_ENC

Code character encoding for each mode.

public const CHAR_ENC = [
    // MODE_UPPER (initial mode)
    0 => [
        32 => 1,
        // ' ' (SP)
        65 => 2,
        // 'A'
        66 => 3,
        // 'B'
        67 => 4,
        // 'C'
        68 => 5,
// … truncated, see source

Source: src/Type/Square/Aztec/Data.php:97

CHAR_MODES

Map character ASCII codes to their non-binary mode.

Exceptions are:

  • the space ’ ’ character (32) that maps for modes 0,1,2.
  • the carriage return ‘\r’ character (13) that maps for modes 3,4.
  • the comma ‘,’ and dot ‘.’ characters (44,46) that map for modes 2,4.
public const CHAR_MODES = [
    1 => 3,
    // '^A' (SOH)
    2 => 3,
    // '^B' (STX)
    3 => 3,
    // '^C' (ETX)
    4 => 3,
    // '^D' (EOT)
    5 => 3,
    // '^E' (ENQ)
    6 => 3,
// … truncated, see source

Source: src/Type/Square/Aztec/Data.php:246

ECI

Extended Channel Interpretation (ECI) codes.

public const ECI = [
    0 => 'FNC1',
    // Function 1 character
    2 => 'Cp437',
    // Code page 437
    3 => 'ISO-8859-1',
    // ISO/IEC 8859-1 - Latin-1 (Default encoding)
    4 => 'ISO-8859-2',
    // ISO/IEC 8859-2 - Latin-2
    5 => 'ISO-8859-3',
    // ISO/IEC 8859-3 - Latin-3
    6 => 'ISO-8859-4',
// … truncated, see source

Source: src/Type/Square/Aztec/Data.php:461

LATCH_MAP

Latch map for changing character encoding mode.

Numbers represent: [number of bits to change, latch code value].

public const LATCH_MAP = [
    // MODE_UPPER
    0 => [
        1 => [[5, 28]],
        // -> LOWER
        2 => [[5, 30]],
        // -> DIGIT
        3 => [[5, 29]],
        // -> MIXED
        4 => [[5, 29], [5, 30]],
    ],
    // MODE_LOWER
// … truncated, see source

Source: src/Type/Square/Aztec/Data.php:369

MODE_BINARY

Code character encoding mode for binary.

public const MODE_BINARY = 5

Source: src/Type/Square/Aztec/Data.php:76

MODE_BITS

Number of bits for each character encoding mode.

public const MODE_BITS = [
    5,
    // 0 = MODE_UPPER
    5,
    // 1 = MODE_LOWER
    4,
    // 2 = MODE_DIGIT
    5,
    // 3 = MODE_MIXED
    5,
    // 4 = MODE_PUNCT
    8,
// … truncated, see source

Source: src/Type/Square/Aztec/Data.php:83

MODE_DIGIT

Code character encoding mode for digits.

public const MODE_DIGIT = 2

Source: src/Type/Square/Aztec/Data.php:55

MODE_LOWER

Code character encoding mode for lowercase letters.

public const MODE_LOWER = 1

Source: src/Type/Square/Aztec/Data.php:48

MODE_MIXED

Code character encoding mode for mixed cases.

public const MODE_MIXED = 3

Source: src/Type/Square/Aztec/Data.php:62

MODE_PUNCT

Code character encoding mode for punctuation.

public const MODE_PUNCT = 4

Source: src/Type/Square/Aztec/Data.php:69

MODE_UPPER

Code character encoding mode for uppercase letters.

public const MODE_UPPER = 0

Source: src/Type/Square/Aztec/Data.php:41

SHIFT_MAP

Shift map for changing character encoding mode.

Numbers represent: [number of bits to change, shift code value].

public const SHIFT_MAP = [
    // MODE_UPPER
    0 => [
        1 => [],
        2 => [],
        3 => [],
        4 => [[5, 0]],
        // -> PUNCT
        5 => [[5, 31]],
    ],
    // MODE_LOWER
    1 => [
// … truncated, see source

Source: src/Type/Square/Aztec/Data.php:413

SIZE_COMPACT

Size and capacities of Aztec Compact Code symbols by number of layers.

The array entries are:

  • 0: symbol x size;
  • 1: codeword count;
  • 2: codeword size;
  • 3: symbol bit capacity;
  • 4: symbol data digits capacity;
  • 5: symbol data text capacity;
  • 6: symbol data bytes capacity.
public const SIZE_COMPACT = [1 => [15, 17, 6, 102, 13, 12, 6], 2 => [19, 40, 6, 240, 40, 33, 19], 3 => [23, 51, 8, 408, 70, 57, 33], 4 => [27, 76, 8, 608, 110, 89, 53]]

Source: src/Type/Square/Aztec/Data.php:505

SIZE_FULL

Size and capacities of Aztec Full-range Code symbols by number of layers.

The array entries are:

  • 0: symbol x size;
  • 1: codeword count;
  • 2: codeword size;
  • 3: symbol bit capacity;
  • 4: symbol data digits capacity;
  • 5: symbol data text capacity;
  • 6: symbol data bytes capacity.
public const SIZE_FULL = [1 => [19, 21, 6, 126, 18, 15, 8], 2 => [23, 48, 6, 288, 49, 40, 24], 3 => [27, 60, 8, 480, 84, 68, 40], 4 => [31, 88, 8, 704, 128, 104, 62], 5 => [37, 120, 8, 960, 178, 144, 87], 6 => [41, 156, 8, 1248, 232, 187, 114], 7 => [45, 196, 8, 1568, 294, 236, 145], 8 => [49, 240, 8, 1920, 362, 291, 179], 9 => [53, 230, 10, 2300, 433, 348, 214], 10 => [57, 272, 10, 2720, 516, 414, 256], 11 => [61, 316, 1
// … truncated, see source

Source: src/Type/Square/Aztec/Data.php:525