Constants

NUM_MASK_PATTERNS

NUM_MASK_PATTERNS = 8

Number of possible mask patterns.

Properties

$mode

$mode : \BaconQrCode\Common\Mode

Mode of the QR code.

Type

Mode

$errorCorrectionLevel

$errorCorrectionLevel : \BaconQrCode\Common\ErrorCorrectionLevel

EC level of the QR code.

Type

ErrorCorrectionLevel

$version

$version : \BaconQrCode\Common\Version

Version of the QR code.

Type

Version

$maskPattern

$maskPattern : int

Mask pattern of the QR code.

Type

int

$matrix

$matrix : \BaconQrCode\Encoder\ByteMatrix

Matrix of the QR code.

Type

ByteMatrix

Methods

getMode()

getMode() : \BaconQrCode\Common\Mode

Gets the mode.

Returns

\BaconQrCode\Common\Mode —

setMode()

setMode(\BaconQrCode\Common\Mode  $mode) : void

Sets the mode.

Parameters

\BaconQrCode\Common\Mode $mode

getErrorCorrectionLevel()

getErrorCorrectionLevel() : \BaconQrCode\Common\ErrorCorrectionLevel

Gets the EC level.

Returns

\BaconQrCode\Common\ErrorCorrectionLevel —

setErrorCorrectionLevel()

setErrorCorrectionLevel(\BaconQrCode\Common\ErrorCorrectionLevel  $errorCorrectionLevel) : void

Sets the EC level.

Parameters

\BaconQrCode\Common\ErrorCorrectionLevel $errorCorrectionLevel

getVersion()

getVersion() : \BaconQrCode\Common\Version

Gets the version.

Returns

\BaconQrCode\Common\Version —

setVersion()

setVersion(\BaconQrCode\Common\Version  $version) : void

Sets the version.

Parameters

\BaconQrCode\Common\Version $version

getMaskPattern()

getMaskPattern() : int

Gets the mask pattern.

Returns

int —

setMaskPattern()

setMaskPattern(int  $maskPattern) : void

Sets the mask pattern.

Parameters

int $maskPattern

getMatrix()

getMatrix() : \BaconQrCode\Encoder\ByteMatrix

Gets the matrix.

Returns

\BaconQrCode\Encoder\ByteMatrix —

setMatrix()

setMatrix(\BaconQrCode\Encoder\ByteMatrix  $matrix) : void

Sets the matrix.

Parameters

\BaconQrCode\Encoder\ByteMatrix $matrix

isValidMaskPattern()

isValidMaskPattern(int  $maskPattern) : bool

Validates whether a mask pattern is valid.

Parameters

int $maskPattern

Returns

bool —

__toString()

__toString() : string

Returns a string representation of the QR code.

Returns

string —