Documentation

AlphaNum extends QRDataModeAbstract
in package

FinalYes

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

Constants

DATAMODE  = \chillerlan\QRCode\Common\Mode::ALPHANUM
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

Properties

$data  : string
The data to write

Methods

__construct()  : mixed
QRDataModeAbstract constructor.
convertEncoding()  : string
encoding conversion helper
decodeSegment()  : string
reads a segment from the BitBuffer and decodes in the current data mode
getLengthInBits()  : int
retruns the length in bits of the data string
validateString()  : bool
checks if the given string qualifies for the encoder module
write()  : static
writes the actual data string to the BitBuffer, uses the given version to determine the length bits
getCharCount()  : int
returns the character count of the $data string
getLengthBits()  : int
shortcut

Constants

DATAMODE

public mixed DATAMODE = \chillerlan\QRCode\Common\Mode::ALPHANUM
Tags
inheritDoc

CHAR_TO_ORD

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

Methods

convertEncoding()

encoding conversion helper

public static convertEncoding(string $string) : string
Parameters
$string : string
Tags
inheritDoc
Return values
string

decodeSegment()

reads a segment from the BitBuffer and decodes in the current data mode

public static decodeSegment(BitBuffer $bitBuffer, int $versionNumber) : string
Parameters
$bitBuffer : BitBuffer
$versionNumber : int
Tags
inheritDoc
throws
QRCodeDataException
Return values
string

getLengthInBits()

retruns the length in bits of the data string

public getLengthInBits() : int
Tags
inheritDoc
Return values
int

validateString()

checks if the given string qualifies for the encoder module

public static validateString(string $string) : bool
Parameters
$string : string
Tags
inheritDoc
Return values
bool

write()

writes the actual data string to the BitBuffer, uses the given version to determine the length bits

public write(BitBuffer $bitBuffer, int $versionNumber) : static
Parameters
$bitBuffer : BitBuffer
$versionNumber : int
Tags
inheritDoc
Return values
static

getCharCount()

returns the character count of the $data string

protected getCharCount() : int
Return values
int

getLengthBits()

shortcut

protected static getLengthBits(int $versionNumber) : int
Parameters
$versionNumber : int
Return values
int

        
On this page

Search results