Skip to content

QROutputAbstract

common output abstract

Properties

moduleCount

the current size of the QR matrix

protected int $moduleCount

See Also:

  • \chillerlan\QRCode\Data\QRMatrix::size() -

outputMode

the current output mode

protected string $outputMode

See Also:

  • \chillerlan\QRCode\QROptions::$outputType -

defaultMode

the default output mode of the current output module

protected string $defaultMode

scale

the current scaling for a QR pixel

protected int $scale

See Also:

  • \chillerlan\QRCode\QROptions::$scale -

length

the side length of the QR image (modules * scale)

protected int $length

moduleValues

an (optional) array of color values for the several QR matrix parts

protected array $moduleValues

matrix

the (filled) data matrix object

protected \chillerlan\QRCode\Data\QRMatrix $matrix

options

protected \chillerlan\Settings\SettingsContainerInterface|\chillerlan\QRCode\QROptions $options

Methods

__construct

QROutputAbstract constructor.

public __construct(\chillerlan\Settings\SettingsContainerInterface $options, \chillerlan\QRCode\Data\QRMatrix $matrix): mixed

Parameters:

Parameter Type Description
$options \chillerlan\Settings\SettingsContainerInterface
$matrix \chillerlan\QRCode\Data\QRMatrix

setModuleValues

Sets the initial module values (clean-up & defaults)

protected setModuleValues(): void
  • This method is abstract.

saveToFile

saves the qr data to a file

protected saveToFile(string $data, string $file): bool

Parameters:

Parameter Type Description
$data string
$file string

Throws:

See Also:

  • \chillerlan\QRCode\Output\file_put_contents() - * \chillerlan\QRCode\QROptions::cachefile -

dump

generates the output, optionally dumps it to a file, and returns it

public dump(string $file = null): mixed

Parameters:

Parameter Type Description
$file string


Automatically generated on 2025-03-18