Encoder extends Init
in package
Com\Tecnick\Barcode\Type\Square\QrCode\Encoder
Tags
Table of Contents
Properties
- $version : int
- QR code version.
Methods
- __construct() : mixed
- Initialize
- encodeMask() : array<int, string>
- Encode mask
Properties
$version
QR code version.
public int $version
The Size of QRcode is defined as version. Version is an integer value from 1 to 40. Version 1 is 2121 matrix. And 4 modules increases whenever 1 version increases. So version 40 is 177177 matrix.
Methods
__construct()
Initialize
public __construct(int $version,
int $level[,
int $qr_find_from_random
= -1
][,
bool $qr_find_best_mask
= true
][,
int $qr_default_mask
= 2
]) : mixed
Parameters
- $version : int
-
Code version
- $level : int
-
Error Correction Level
- $qr_find_from_random : int = -1
-
If negative, checks all masks available, otherwise the value indicates the number of masks to be checked, mask ids are random
- $qr_find_best_mask : bool = true
-
If true, estimates best mask (slow)
- $qr_default_mask : int = 2
-
Default mask used when $fbm is false
encodeMask()
Encode mask
public encodeMask(int $maskNo,
array<int,
int> $datacode)
: array<int,
string>
Parameters
- $maskNo : int
-
Mask number (masking mode)
- $datacode : array<int, int>
-
Data code to encode
Return values
array<int, string> —Encoded Mask