Documentation

QRData
in package

Processes the binary data and maps it on a matrix which is then being returned

Table of Contents

$bitBuffer  : BitBuffer
a BitBuffer instance
$dataSegments  : array<string|int, mixed>
$eccLevel  : EccLevel
an EccLevel instance
$maxBitsForEcc  : array<string|int, mixed>
Max bits for the current ECC mode
$options  : SettingsContainerInterface
the options instance
$version  : Version
current QR Code version
__construct()  : mixed
QRData constructor.
setData()  : self
Sets the data string (internally called by the constructor)
writeMatrix()  : QRMatrix
returns a fresh matrix object with the data written for the given $maskPattern
estimateTotalBitLength()  : int
estimates the total length of the several mode segments in order to guess the minimum version
getMinimumVersion()  : int
returns the minimum version number for the given string
writeBitBuffer()  : void
creates a BitBuffer and writes the string data to it

Properties

$dataSegments

private array<string|int, mixed> $dataSegments = []

$maxBitsForEcc

Max bits for the current ECC mode

private array<string|int, mixed> $maxBitsForEcc

$options

the options instance

private SettingsContainerInterface $options

Methods

__construct()

QRData constructor.

public __construct(SettingsContainerInterface $options[, array<string|int, QRDataModeInterface>|null $dataSegments = null ]) : mixed
Parameters
$options : SettingsContainerInterface
$dataSegments : array<string|int, QRDataModeInterface>|null = null
Return values
mixed

setData()

Sets the data string (internally called by the constructor)

public setData(array<string|int, mixed> $dataSegments) : self
Parameters
$dataSegments : array<string|int, mixed>
Return values
self

writeMatrix()

returns a fresh matrix object with the data written for the given $maskPattern

public writeMatrix(MaskPattern $maskPattern[, bool $test = null ]) : QRMatrix
Parameters
$maskPattern : MaskPattern
$test : bool = null
Return values
QRMatrix

estimateTotalBitLength()

estimates the total length of the several mode segments in order to guess the minimum version

private estimateTotalBitLength() : int
Tags
throws
QRCodeDataException
Return values
int

getMinimumVersion()

returns the minimum version number for the given string

private getMinimumVersion() : int
Tags
throws
QRCodeDataException
Return values
int

writeBitBuffer()

creates a BitBuffer and writes the string data to it

private writeBitBuffer() : void
Tags
throws
QRCodeException

on data overflow

Return values
void

Search results