Documentation

Number extends QRDataModeAbstract
in package

Numeric mode: decimal digits 0 to 9

ISO/IEC 18004:2000 Section 8.3.2 ISO/IEC 18004:2000 Section 8.4.2

Table of Contents

NUMBER_TO_ORD  = ['0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9]
$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
parseInt()  : int
get the code for the given numeric string

Constants

NUMBER_TO_ORD

private array<string|int, int> NUMBER_TO_ORD = ['0' => 0, '1' => 1, '2' => 2, '3' => 3, '4' => 4, '5' => 5, '6' => 6, '7' => 7, '8' => 8, '9' => 9]

Properties

$datamode

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

protected static int $datamode = chillerlanQRCodeCommonMode::NUMBER
Tags
inheritDoc

Methods

decodeSegment()

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

getDataMode()

returns the current data mode constant

public getDataMode() : int
Tags
inheritDoc
Return values
int

getLengthInBits()

public getLengthInBits() : int
Tags
inheritDoc
Return values
int

validateString()

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

write()

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

getCharCount()

returns the character count of the $data string

protected getCharCount() : int
Return values
int

parseInt()

get the code for the given numeric string

protected parseInt(string $string) : int
Parameters
$string : string
Tags
throws
QRCodeDataException

on an illegal character occurence

Return values
int

Search results