QrEncodingMode

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.

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

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