Table of contents
Namespace: Com\Tecnick\Barcode\Type\Square\QrCode
Backing type: string
File: QrEncodingMode.php line 36
Backed enum for the QR Code data encoding mode hint. The backing value of each case is the token accepted as the second parameter of QrCode. Only KJ changes the encoder behaviour, by adding the kanji mode to the modes it may use.
Tags
- since: 2026-07-17
- category: Library
- author: Nicola Asuni info@tecnick.com
- copyright: 2010-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
Cases
NL
File: QrEncodingMode.php line 39
NM
File: QrEncodingMode.php line 42
AN
File: QrEncodingMode.php line 45
Byte
File: QrEncodingMode.php line 48
KJ
File: QrEncodingMode.php line 51
ST
File: QrEncodingMode.php line 54
Methods
fromLoose()
File: QrEncodingMode.php line 65
public static fromLoose(string|self $value) : self
Accepts the canonical token or an enum instance (returned unchanged). Unknown values fall back to Byte (8B), matching the lenient behavior of QrCode.
Parameters
- $value : string|self: Encoding mode token or enum case.
Return values
self