Menu

## Mode
in package

Mode.php : 19

ISO 18004:2006, 6.4.1, Tables 2 and 3

### Table of Contents

ALPHANUM = 0b10
BYTE = 0b100
ECI = 0b111
FNC1_FIRST = 0b101
FNC1_SECOND = 0b1001
HANZI = 0b1101
INTERFACES = [self::NUMBER => \chillerlan\QRCode\Data\Number::class, self::ALPHANUM => \chillerlan\QRCode\Data\AlphaNum::class, self::KANJI => \chillerlan\QRCode\Data\Kanji::class, self::HANZI => \chillerlan\QRCode\Data\Hanzi::class, self::BYTE => \chillerlan\QRCode\Data\Byte::class]
  Map of data mode => interface (detection order)
KANJI = 0b1000
LENGTH_BITS = [self::NUMBER => [10, 12, 14], self::ALPHANUM => [9, 11, 13], self::BYTE => [8, 16, 16], self::KANJI => [8, 10, 12], self::HANZI => [8, 10, 12]]
  mode length bits for the version breakpoints 1-9, 10-26 and 27-40
NUMBER = 0b1
STRCTURED_APPEND = 0b11
TERMINATOR = 0b0
getLengthBitsForMode() : array<string|int, mixed>
  returns the array of length bits for the given mode
getLengthBitsForVersion() : int
  returns the length bits for the version breakpoints 1-9, 10-26 and 27-40

### Constants

#### ALPHANUM

Mode.php : 28
`public int ALPHANUM = 0b10`

#### BYTE

Mode.php : 30
`public int BYTE = 0b100`

#### ECI

Mode.php : 42
`public int ECI = 0b111`

#### FNC1_FIRST

Mode.php : 38
`public int FNC1_FIRST = 0b101`

#### FNC1_SECOND

Mode.php : 40
`public int FNC1_SECOND = 0b1001`

#### HANZI

Mode.php : 34
`public int HANZI = 0b1101`

#### INTERFACES

Mode.php : 62

Map of data mode => interface (detection order)

`public array<string|int, string> INTERFACES = [self::NUMBER => \chillerlan\QRCode\Data\Number::class, self::ALPHANUM => \chillerlan\QRCode\Data\AlphaNum::class, self::KANJI => \chillerlan\QRCode\Data\Kanji::class, self::HANZI => \chillerlan\QRCode\Data\Hanzi::class, self::BYTE => \chillerlan\QRCode\Data\Byte::class]`

#### KANJI

Mode.php : 32
`public int KANJI = 0b1000`

#### LENGTH_BITS

Mode.php : 49

mode length bits for the version breakpoints 1-9, 10-26 and 27-40

`public mixed LENGTH_BITS = [self::NUMBER => [10, 12, 14], self::ALPHANUM => [9, 11, 13], self::BYTE => [8, 16, 16], self::KANJI => [8, 10, 12], self::HANZI => [8, 10, 12]]`

ISO/IEC 18004:2000 Table 3 - Number of bits in Character Count Indicator

#### NUMBER

Mode.php : 26
`public int NUMBER = 0b1`

#### STRCTURED_APPEND

Mode.php : 36
`public int STRCTURED_APPEND = 0b11`

#### TERMINATOR

Mode.php : 24
`public int TERMINATOR = 0b0`

### Methods

#### getLengthBitsForMode()

Mode.php : 100

returns the array of length bits for the given mode

`public static getLengthBitsForMode(int $mode) : array<string|int, mixed>`

##### Parameters

$mode : int

##### Tags

throws
  QRCodeException

##### Return values

array<string|int, mixed> —

#### getLengthBitsForVersion()

Mode.php : 75

returns the length bits for the version breakpoints 1-9, 10-26 and 27-40

`public static getLengthBitsForVersion(int $mode, int $version) : int`

##### Parameters

$mode : int
$version : int

##### Tags

throws
  QRCodeException

##### Return values

int —

## Search results