QRDataAbstract
Processes the binary data and maps it on a matrix which is then being returned
- Full name:
\chillerlan\QRCode\Data\QRDataAbstract
- This class implements:
\chillerlan\QRCode\Data\QRDataInterface
- This class is an Abstract class
Properties
strlen
the string byte count
datamode
the current data mode: Num, Alphanum, Kanji, Byte
lengthBits
mode length bits for the version breakpoints 1-9, 10-26 and 27-40
ISO/IEC 18004:2000 Table 3 - Number of bits in Character Count Indicator
version
current QR Code version
ecdata
ECC temp data
dcdata
ECC temp data
options
the options instance
bitBuffer
a BitBuffer instance
Methods
__construct
QRDataInterface constructor.
public __construct(\chillerlan\Settings\SettingsContainerInterface $options, string $data = null): mixed
Parameters:
Parameter | Type | Description |
---|---|---|
$options |
\chillerlan\Settings\SettingsContainerInterface | |
$data |
string |
setData
Sets the data string (internally called by the constructor)
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
string |
initMatrix
returns a fresh matrix object with the data written for the given $maskPattern
Parameters:
Parameter | Type | Description |
---|---|---|
$maskPattern |
int | |
$test |
bool |
getLengthBits
returns the length bits for the version breakpoints 1-9, 10-26 and 27-40
Throws:
getLength
returns the byte count of the $data string
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
string |
getMinimumVersion
returns the minimum version number for the given string
Throws:
write
writes the actual data string to the BitBuffer
- This method is abstract.
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
string |
See Also:
- \chillerlan\QRCode\Data\QRDataAbstract::writeBitBuffer() -
writeBitBuffer
creates a BitBuffer and writes the string data to it
Parameters:
Parameter | Type | Description |
---|---|---|
$data |
string |
Throws:
on data overflow
maskECC
ECC masking
ISO/IEC 18004:2000 Section 8.5 ff
See Also:
- http://www.thonky.com/qr-code-tutorial/error-correction-coding -
poly
helper method for the polynomial operations
Parameters:
Parameter | Type | Description |
---|---|---|
$key |
int | |
$count |
int |
Automatically generated on 2025-03-18