Menu

## AlphaNum extends QRDataModeAbstract
in package

AlphaNum.php : 23

Alphanumeric mode: 0 to 9, A to Z, space, $ % * + - . / :

ISO/IEC 18004:2000 Section 8.3.3 ISO/IEC 18004:2000 Section 8.4.3

### Table of Contents

CHAR_TO_ORD = ['0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9, 'A' => 10, 'B' => 11, 'C' => 12, 'D' => 13, 'E' => 14, 'F' => 15, 'G' => 16, 'H' => 17, 'I' => 18, 'J' => 19, 'K' => 20, 'L' => 21, 'M' => 22, 'N' => 23, 'O' => 24, 'P' => 25, 'Q' => 26, 'R' => 27, 'S' => 28, 'T' => 29, 'U' => 30, 'V' => 31, 'W' => 32, 'X' => 33, 'Y' => 34, 'Z' => 35, ' ' => 36, '$' => 37, '%' => 38, '*' => 39, '+' => 40, '-' => 41, '.' => 42, '/' => 43, ':' => 44]
  ISO/IEC 18004:2000 Table 5
$data : string
  The data to write
$datamode : int
  the current data mode: Num, Alphanum, Kanji, Byte
__construct() : mixed
  QRDataModeAbstract constructor.
decodeSegment() : string
getDataMode() : int
  returns the current data mode constant
getLengthInBits() : int
validateString() : bool
write() : void
getCharCount() : int
  returns the character count of the $data string
getLengthBits() : int
  shortcut

### Constants

#### CHAR_TO_ORD

AlphaNum.php : 30

ISO/IEC 18004:2000 Table 5

`private array<string|int, int> CHAR_TO_ORD = ['0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9, 'A' => 10, 'B' => 11, 'C' => 12, 'D' => 13, 'E' => 14, 'F' => 15, 'G' => 16, 'H' => 17, 'I' => 18, 'J' => 19, 'K' => 20, 'L' => 21, 'M' => 22, 'N' => 23, 'O' => 24, 'P' => 25, 'Q' => 26, 'R' => 27, 'S' => 28, 'T' => 29, 'U' => 30, 'V' => 31, 'W' => 32, 'X' => 33, 'Y' => 34, 'Z' => 35, ' ' => 36, '$' => 37, '%' => 38, '*' => 39, '+' => 40, '-' => 41, '.' => 42, '/' => 43, ':' => 44]`

### Properties

#### $data

QRDataModeAbstract.php : 27

The data to write

`protected string $data`

#### $datamode

AlphaNum.php : 42

the current data mode: Num, Alphanum, Kanji, Byte

`protected static int $datamode = \chillerlan\QRCode\Common\Mode::ALPHANUM`

##### Tags

inheritDoc

### Methods

#### __construct()

QRDataModeAbstract.php : 34

QRDataModeAbstract constructor.

`public __construct(string $data) : mixed`

##### Parameters

$data : string

##### Tags

throws
  QRCodeDataException

##### Return values

mixed —

#### decodeSegment()

AlphaNum.php : 93
`public static decodeSegment(BitBuffer $bitBuffer, int $versionNumber) : string`

##### Parameters

$bitBuffer : BitBuffer
$versionNumber : int

##### Tags

inheritDoc
throws
  QRCodeDataException

##### Return values

string —

#### getDataMode()

QRDataModeAbstract.php : 53

returns the current data mode constant

`public getDataMode() : int`

##### Tags

inheritDoc

##### Return values

int —

#### getLengthInBits()

AlphaNum.php : 47
`public getLengthInBits() : int`

##### Tags

inheritDoc

##### Return values

int —

#### validateString()

AlphaNum.php : 54
`public static validateString(string $string) : bool`

##### Parameters

$string : string

##### Tags

inheritDoc

##### Return values

bool —

#### write()

AlphaNum.php : 68
`public write(BitBuffer $bitBuffer, int $versionNumber) : void`

##### Parameters

$bitBuffer : BitBuffer
$versionNumber : int

##### Tags

inheritDoc

##### Return values

void —

#### getCharCount()

QRDataModeAbstract.php : 46

returns the character count of the $data string

`protected getCharCount() : int`

##### Return values

int —

#### getLengthBits()

QRDataModeAbstract.php : 60

shortcut

`protected static getLengthBits(int $versionNumber) : int`

##### Parameters

$versionNumber : int

##### Return values

int —

## Search results