Skip to content

Kanji

Kanji mode: double-byte characters from the Shift JIS character set

ISO/IEC 18004:2000 Section 8.3.5 ISO/IEC 18004:2000 Section 8.4.5

Properties

datamode

the current data mode: Num, Alphanum, Kanji, Byte

protected int $datamode

lengthBits

mode length bits for the version breakpoints 1-9, 10-26 and 27-40

protected array $lengthBits

ISO/IEC 18004:2000 Table 3 - Number of bits in Character Count Indicator


Methods

getLength

returns the byte count of the $data string

protected getLength(string $data): int

Parameters:

Parameter Type Description
$data string

write

writes the actual data string to the BitBuffer

protected write(string $data): void

Parameters:

Parameter Type Description
$data string

Throws:

on an illegal character occurence


Inherited methods

__construct

QRDataInterface constructor.

public __construct(\chillerlan\Settings\SettingsContainerInterface $options, string $data = null): mixed

Parameters:

Parameter Type Description
$options \chillerlan\Settings\SettingsContainerInterface
$data string

setData

Sets the data string (internally called by the constructor)

public setData(string $data): \chillerlan\QRCode\Data\QRDataInterface

Parameters:

Parameter Type Description
$data string

initMatrix

returns a fresh matrix object with the data written for the given $maskPattern

public initMatrix(int $maskPattern, bool $test = null): \chillerlan\QRCode\Data\QRMatrix

Parameters:

Parameter Type Description
$maskPattern int
$test bool

getLengthBits

returns the length bits for the version breakpoints 1-9, 10-26 and 27-40

protected getLengthBits(): int

Throws:


getLength

returns the byte count of the $data string

protected getLength(string $data): int

Parameters:

Parameter Type Description
$data string

getMinimumVersion

returns the minimum version number for the given string

protected getMinimumVersion(): int

Throws:


write

writes the actual data string to the BitBuffer

protected write(string $data): void
  • This method is abstract.

Parameters:

Parameter Type Description
$data string

See Also:

  • \chillerlan\QRCode\Data\QRDataAbstract::writeBitBuffer() -

writeBitBuffer

creates a BitBuffer and writes the string data to it

protected writeBitBuffer(string $data): void

Parameters:

Parameter Type Description
$data string

Throws:

on data overflow


maskECC

ECC masking

protected maskECC(): array

ISO/IEC 18004:2000 Section 8.5 ff

See Also:

  • http://www.thonky.com/qr-code-tutorial/error-correction-coding -

poly

helper method for the polynomial operations

protected poly(int $key, int $count): array

Parameters:

Parameter Type Description
$key int
$count int


Automatically generated on 2025-03-18