Menu

## QRData
in package

QRData.php : 21

Processes the binary data and maps it on a QRMatrix 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.
getBitBuffer() : BitBuffer
  Returns the current BitBuffer instance
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
estimateTotalBitLength() : int
  estimates the total length of the several mode segments in order to guess the minimum version
getMinimumVersion() : Version
  returns the minimum version number for the given string
writeBitBuffer() : void
  creates a BitBuffer and writes the string data to it

### Properties

#### $bitBuffer

QRData.php : 33

a BitBuffer instance

`private BitBuffer $bitBuffer`

#### $dataSegments

QRData.php : 48
`private array<string|int, mixed> $dataSegments = []`

#### $eccLevel

QRData.php : 38

an EccLevel instance

`private EccLevel $eccLevel`

#### $maxBitsForEcc

QRData.php : 55

Max bits for the current ECC mode

`private array<string|int, mixed> $maxBitsForEcc`

#### $options

QRData.php : 28

the options instance

`private SettingsContainerInterface $options`

#### $version

QRData.php : 43

current QR Code version

`private Version $version`

### Methods

#### __construct()

QRData.php : 60

QRData constructor.

`public __construct(SettingsContainerInterface $options[, array<string|int, mixed> $dataSegments = [] ]) : mixed`

##### Parameters

$options : SettingsContainerInterface
$dataSegments : array<string|int, mixed> = []

##### Return values

mixed —

#### getBitBuffer()

QRData.php : 91

Returns the current BitBuffer instance

`public getBitBuffer() : BitBuffer`

##### Tags

codeCoverageIgnore

##### Return values

BitBuffer —

#### setBitBuffer()

QRData.php : 104

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

throws
  QRCodeDataException

##### Return values

self —

#### setData()

QRData.php : 76

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

self —

#### writeMatrix()

QRData.php : 124

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

`public writeMatrix(MaskPattern $maskPattern) : QRMatrix`

##### Parameters

$maskPattern : MaskPattern

##### Return values

QRMatrix —

#### estimateTotalBitLength()

QRData.php : 137

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()

QRData.php : 171

returns the minimum version number for the given string

`private getMinimumVersion() : Version`

##### Tags

throws
  QRCodeDataException

##### Return values

Version —

#### writeBitBuffer()

QRData.php : 195

creates a BitBuffer and writes the string data to it

`private writeBitBuffer() : void`

##### Tags

throws
  QRCodeException

  on data overflow

##### Return values

void —

## Search results