Table of contents
Namespace: Com\Tecnick\Barcode\Type\Square\MicroQrCode
class Encode extends Compaction
Extends: Compaction
Source: src/Type/Square/MicroQrCode/Encode.php:37
Symbol builder for the MicroQrCode Barcode type class
Methods
__construct()
Build the symbol.
public __construct(string $code, string $level, int $version, int $mode)
Parameters:
$code(string): Code to encode.$level(string): Error correction level (L, M or Q), or an empty string to select the smallest symbol.$version(int): Symbol version, from 1 to 4, or 0 to select the smallest symbol.$mode(int): Encodation mode, or a negative value to select the mode that yields the shortest bit stream.
Throws:
- Exception: in case of error
Source: src/Type/Square/MicroQrCode/Encode.php:106
getGrid()
Returns the module matrix as an array of rows of binary digits.
public getGrid(): array<int,string>
Returns: array<int,string>
Source: src/Type/Square/MicroQrCode/Encode.php:133
getLevel()
Returns the error correction level, or an empty string for the version M1, which carries error detection only.
public getLevel(): string
Returns: string
Source: src/Type/Square/MicroQrCode/Encode.php:155
getMask()
Returns the data mask pattern reference, from 0 to 3.
public getMask(): int
Returns: int
Source: src/Type/Square/MicroQrCode/Encode.php:163
getVersion()
Returns the symbol version, from 1 to 4, that is M1 to M4.
public getVersion(): int
Returns: int