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_MAP = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'
- 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
- chr() : string
- ord() : int
Constants
DATAMODE
public
mixed
DATAMODE
= \chillerlan\QRCode\Common\Mode::ALPHANUM
CHAR_MAP
ISO/IEC 18004:2000 Table 5
private
string
CHAR_MAP
= '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'
Properties
$data
The data to write
protected
string
$data
Methods
__construct()
QRDataModeAbstract constructor.
public
__construct(string $data) : mixed
Parameters
- $data : string
Tags
convertEncoding()
encoding conversion helper
public
static convertEncoding(string $string) : string
Parameters
- $string : string
Return values
stringdecodeSegment()
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
Return values
stringgetLengthInBits()
retruns the length in bits of the data string
public
getLengthInBits() : int
Return values
intvalidateString()
checks if the given string qualifies for the encoder module
public
static validateString(string $string) : bool
Parameters
- $string : string
Return values
boolwrite()
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
Return values
staticgetCharCount()
returns the character count of the $data string
protected
getCharCount() : int
Return values
intgetLengthBits()
shortcut
protected
static getLengthBits(int $versionNumber) : int
Parameters
- $versionNumber : int
Return values
intchr()
private
static chr(int $ord) : string
Parameters
- $ord : int
Tags
Return values
stringord()
private
ord(string $chr) : int
Parameters
- $chr : string