QrCode
in package
QR code.
Table of Contents
- NUM_MASK_PATTERNS = 8
- Number of possible mask patterns.
- $errorCorrectionLevel : ErrorCorrectionLevel
- EC level of the QR code.
- $maskPattern : int
- Mask pattern of the QR code.
- $matrix : ByteMatrix
- Matrix of the QR code.
- $mode : Mode
- Mode of the QR code.
- $version : Version
- Version of the QR code.
- __construct() : mixed
- __toString() : string
- Returns a string representation of the QR code.
- getErrorCorrectionLevel() : ErrorCorrectionLevel
- Gets the EC level.
- getMaskPattern() : int
- Gets the mask pattern.
- getMatrix() : ByteMatrix
- Gets the matrix.
- getMode() : Mode
- Gets the mode.
- getVersion() : Version
- Gets the version.
- isValidMaskPattern() : bool
- Validates whether a mask pattern is valid.
Constants
NUM_MASK_PATTERNS
Number of possible mask patterns.
public
mixed
NUM_MASK_PATTERNS
= 8
Properties
$errorCorrectionLevel
EC level of the QR code.
private
ErrorCorrectionLevel
$errorCorrectionLevel
$maskPattern
Mask pattern of the QR code.
private
int
$maskPattern
= -1
$matrix
Matrix of the QR code.
private
ByteMatrix
$matrix
$mode
Mode of the QR code.
private
Mode
$mode
$version
Version of the QR code.
private
Version
$version
Methods
__construct()
public
__construct(Mode $mode, ErrorCorrectionLevel $errorCorrectionLevel, Version $version, int $maskPattern, ByteMatrix $matrix) : mixed
Parameters
- $mode : Mode
- $errorCorrectionLevel : ErrorCorrectionLevel
- $version : Version
- $maskPattern : int
- $matrix : ByteMatrix
Return values
mixed —__toString()
Returns a string representation of the QR code.
public
__toString() : string
Return values
string —getErrorCorrectionLevel()
Gets the EC level.
public
getErrorCorrectionLevel() : ErrorCorrectionLevel
Return values
ErrorCorrectionLevel —getMaskPattern()
Gets the mask pattern.
public
getMaskPattern() : int
Return values
int —getMatrix()
Gets the matrix.
public
getMatrix() : ByteMatrix
Return values
ByteMatrix —getMode()
Gets the mode.
public
getMode() : Mode
Return values
Mode —getVersion()
Gets the version.
public
getVersion() : Version
Return values
Version —isValidMaskPattern()
Validates whether a mask pattern is valid.
public
static isValidMaskPattern(int $maskPattern) : bool
Parameters
- $maskPattern : int