\BaconQrCode\EncoderQrCode

QR code.

Summary

Methods
Properties
Constants
__construct()
getMode()
getErrorCorrectionLevel()
getVersion()
getMaskPattern()
getMatrix()
isValidMaskPattern()
__toString()
No public properties found
NUM_MASK_PATTERNS
No protected methods found
No protected properties found
N/A
No private methods found
$mode
$errorCorrectionLevel
$version
$maskPattern
$matrix
N/A

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

__construct()

__construct(\BaconQrCode\Common\Mode  $mode, \BaconQrCode\Common\ErrorCorrectionLevel  $errorCorrectionLevel, \BaconQrCode\Common\Version  $version, int  $maskPattern, \BaconQrCode\Encoder\ByteMatrix  $matrix) : mixed

Parameters

\BaconQrCode\Common\Mode $mode
\BaconQrCode\Common\ErrorCorrectionLevel $errorCorrectionLevel
\BaconQrCode\Common\Version $version
int $maskPattern
\BaconQrCode\Encoder\ByteMatrix $matrix

Returns

mixed —

getMode()

getMode() : \BaconQrCode\Common\Mode

Gets the mode.

Returns

\BaconQrCode\Common\Mode —

getErrorCorrectionLevel()

getErrorCorrectionLevel() : \BaconQrCode\Common\ErrorCorrectionLevel

Gets the EC level.

Returns

\BaconQrCode\Common\ErrorCorrectionLevel —

getVersion()

getVersion() : \BaconQrCode\Common\Version

Gets the version.

Returns

\BaconQrCode\Common\Version —

getMaskPattern()

getMaskPattern() : int

Gets the mask pattern.

Returns

int —

getMatrix()

getMatrix() : \BaconQrCode\Encoder\ByteMatrix

Gets the matrix.

Returns

\BaconQrCode\Encoder\ByteMatrix —

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 —