QRData
in package
Processes the binary data and maps it on a QRMatrix which is then being returned
Table of Contents
Properties
- $bitBuffer : BitBuffer
- a BitBuffer instance
- $dataSegments : array<string|int, QRDataModeInterface>
- $eccLevel : EccLevel
- an EccLevel instance
- $maxBitsForEcc : array<string|int, int>
- Max bits for the current ECC mode
- $options : SettingsContainerInterface|QROptions
- the options instance
- $version : Version
- current QR Code version
Methods
- __construct() : mixed
- QRData constructor.
- estimateTotalBitLength() : int
- estimates the total length of the several mode segments in order to guess the minimum version
- getBitBuffer() : BitBuffer
- Returns the current BitBuffer instance
- getMinimumVersion() : Version
- returns the minimum version number for the given string
- setBitBuffer() : self
- Sets a BitBuffer object
- setData() : self
- Sets the data string (internally called by the constructor)
- writeMatrix() : QRMatrix
- returns a fresh matrix object with the data written and masked with the given $maskPattern
- writeBitBuffer() : void
- creates a BitBuffer and writes the string data to it
Properties
$bitBuffer
a BitBuffer instance
private
BitBuffer
$bitBuffer
$dataSegments
private
array<string|int, QRDataModeInterface>
$dataSegments
= []
$eccLevel
an EccLevel instance
private
EccLevel
$eccLevel
$maxBitsForEcc
Max bits for the current ECC mode
private
array<string|int, int>
$maxBitsForEcc
$options
the options instance
private
SettingsContainerInterface|QROptions
$options
$version
current QR Code version
private
Version
$version
Methods
__construct()
QRData constructor.
public
__construct(SettingsContainerInterface|QROptions $options[, array<string|int, QRDataModeInterface> $dataSegments = [] ]) : mixed
Parameters
- $options : SettingsContainerInterface|QROptions
- $dataSegments : array<string|int, QRDataModeInterface> = []
estimateTotalBitLength()
estimates the total length of the several mode segments in order to guess the minimum version
public
estimateTotalBitLength() : int
Tags
Return values
intgetBitBuffer()
Returns the current BitBuffer instance
public
getBitBuffer() : BitBuffer
Tags
Return values
BitBuffergetMinimumVersion()
returns the minimum version number for the given string
public
getMinimumVersion() : Version
Tags
Return values
VersionsetBitBuffer()
Sets a BitBuffer object
public
setBitBuffer(BitBuffer $bitBuffer) : self
This can be used instead of setData(), however, the version auto-detection is not available in this case. The version needs to match the length bits range for the data mode the data has been encoded with, additionally the bit array needs to contain enough pad bits.
Parameters
- $bitBuffer : BitBuffer
Tags
Return values
selfsetData()
Sets the data string (internally called by the constructor)
public
setData(array<string|int, QRDataModeInterface> $dataSegments) : self
Subsequent calls will overwrite the current state - use the QRCode::add*Segement() method instead
Parameters
- $dataSegments : array<string|int, QRDataModeInterface>
Return values
selfwriteMatrix()
returns a fresh matrix object with the data written and masked with the given $maskPattern
public
writeMatrix() : QRMatrix
Return values
QRMatrixwriteBitBuffer()
creates a BitBuffer and writes the string data to it
private
writeBitBuffer() : void