Table of contents
Namespace: Com\Tecnick\Barcode\Type\Square\HanXin
Extends: Compaction
File: Encode.php line 37
Symbol builder for the HanXin Barcode type class
Tags
- since: 2026-09-02
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2015-2026 Nicola Asuni - Tecnick.com LTD
- license: https://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE)
- link: https://github.com/tecnickcom/tc-lib-barcode
Methods
__construct()
File: Encode.php line 114
public __construct(string $code, int $level, int $version, int $mask) : mixed
Parameters
- $code : string: Code to encode.
- $level : int: Error correction level, from 1 to 4.
- $version : int: Symbol version, from 1 to 84, or 0 to select the smallest symbol able to carry the data.
- $mask : int: Data mask pattern reference, from 0 to 3, or a negative value to select the one with the lowest penalty score.
Tags
- throws: Exception in case of error
getDataCodewords()
File: Encode.php line 172
public static getDataCodewords(int $version, int $level) : int
Parameters
- $version : int: Symbol version.
- $level : int: Error correction level.
Return values
int
getGrid()
File: Encode.php line 131
public getGrid() : array<int, string>
Return values
array<int, string>
getLevel()
File: Encode.php line 152
public getLevel() : int
Return values
int
getMask()
File: Encode.php line 160
public getMask() : int
Return values
int
getTotalCodewords()
File: Encode.php line 189
public static getTotalCodewords(int $version, int $level) : int
Parameters
- $version : int: Symbol version.
- $level : int: Error correction level.
Return values
int
getVersion()
File: Encode.php line 144
public getVersion() : int
Return values
int