QROutputInterface
in
Converts the data matrix into readable output
Table of Contents
Constants
- DEFAULT_MODULE_VALUES = [ // light \chillerlan\QRCode\Data\QRMatrix::M_NULL => false, \chillerlan\QRCode\Data\QRMatrix::M_DARKMODULE_LIGHT => false, \chillerlan\QRCode\Data\QRMatrix::M_DATA => false, \chillerlan\QRCode\Data\QRMatrix::M_FINDER => false, \chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR => false, \chillerlan\QRCode\Data\QRMatrix::M_ALIGNMENT => false, \chillerlan\QRCode\Data\QRMatrix::M_TIMING => false, \chillerlan\QRCode\Data\QRMatrix::M_FORMAT => false, \chillerlan\QRCode\Data\QRMatrix::M_VERSION => false, \chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE => false, \chillerlan\QRCode\Data\QRMatrix::M_LOGO => false, \chillerlan\QRCode\Data\QRMatrix::M_FINDER_DOT_LIGHT => false, // dark \chillerlan\QRCode\Data\QRMatrix::M_DARKMODULE => true, \chillerlan\QRCode\Data\QRMatrix::M_DATA_DARK => true, \chillerlan\QRCode\Data\QRMatrix::M_FINDER_DARK => true, \chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR_DARK => true, \chillerlan\QRCode\Data\QRMatrix::M_ALIGNMENT_DARK => true, \chillerlan\QRCode\Data\QRMatrix::M_TIMING_DARK => true, \chillerlan\QRCode\Data\QRMatrix::M_FORMAT_DARK => true, \chillerlan\QRCode\Data\QRMatrix::M_VERSION_DARK => true, \chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE_DARK => true, \chillerlan\QRCode\Data\QRMatrix::M_LOGO_DARK => true, \chillerlan\QRCode\Data\QRMatrix::M_FINDER_DOT => true, ]
- Map of module type => default value
- LAYERNAMES = [ // light \chillerlan\QRCode\Data\QRMatrix::M_NULL => 'null', \chillerlan\QRCode\Data\QRMatrix::M_DARKMODULE_LIGHT => 'darkmodule-light', \chillerlan\QRCode\Data\QRMatrix::M_DATA => 'data', \chillerlan\QRCode\Data\QRMatrix::M_FINDER => 'finder', \chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR => 'separator', \chillerlan\QRCode\Data\QRMatrix::M_ALIGNMENT => 'alignment', \chillerlan\QRCode\Data\QRMatrix::M_TIMING => 'timing', \chillerlan\QRCode\Data\QRMatrix::M_FORMAT => 'format', \chillerlan\QRCode\Data\QRMatrix::M_VERSION => 'version', \chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE => 'quietzone', \chillerlan\QRCode\Data\QRMatrix::M_LOGO => 'logo', \chillerlan\QRCode\Data\QRMatrix::M_FINDER_DOT_LIGHT => 'finder-dot-light', // dark \chillerlan\QRCode\Data\QRMatrix::M_DARKMODULE => 'darkmodule', \chillerlan\QRCode\Data\QRMatrix::M_DATA_DARK => 'data-dark', \chillerlan\QRCode\Data\QRMatrix::M_FINDER_DARK => 'finder-dark', \chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR_DARK => 'separator-dark', \chillerlan\QRCode\Data\QRMatrix::M_ALIGNMENT_DARK => 'alignment-dark', \chillerlan\QRCode\Data\QRMatrix::M_TIMING_DARK => 'timing-dark', \chillerlan\QRCode\Data\QRMatrix::M_FORMAT_DARK => 'format-dark', \chillerlan\QRCode\Data\QRMatrix::M_VERSION_DARK => 'version-dark', \chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE_DARK => 'quietzone-dark', \chillerlan\QRCode\Data\QRMatrix::M_LOGO_DARK => 'logo-dark', \chillerlan\QRCode\Data\QRMatrix::M_FINDER_DOT => 'finder-dot', ]
- Map of module type => readable name (for CSS etc.)
- MIME_TYPE = ''
- Note: do not call this constant from the interface, but rather from one of the child classes
- MODES = [\chillerlan\QRCode\Output\QREps::class, \chillerlan\QRCode\Output\QRFpdf::class, \chillerlan\QRCode\Output\QRGdImageAVIF::class, \chillerlan\QRCode\Output\QRGdImageBMP::class, \chillerlan\QRCode\Output\QRGdImageGIF::class, \chillerlan\QRCode\Output\QRGdImageJPEG::class, \chillerlan\QRCode\Output\QRGdImagePNG::class, \chillerlan\QRCode\Output\QRGdImageWEBP::class, \chillerlan\QRCode\Output\QRImagick::class, \chillerlan\QRCode\Output\QRInterventionImage::class, \chillerlan\QRCode\Output\QRMarkupHTML::class, \chillerlan\QRCode\Output\QRMarkupSVG::class, \chillerlan\QRCode\Output\QRMarkupXML::class, \chillerlan\QRCode\Output\QRStringJSON::class, \chillerlan\QRCode\Output\QRStringText::class]
- Map of built-in output class FQN
Methods
- dump() : mixed
- Generates the output, optionally dumps it to a file, and returns it
- moduleValueIsValid() : bool
- Determines whether the given value is valid
Constants
DEFAULT_MODULE_VALUES
Map of module type => default value
public
array<string|int, bool>
DEFAULT_MODULE_VALUES
= [
// light
\chillerlan\QRCode\Data\QRMatrix::M_NULL => false,
\chillerlan\QRCode\Data\QRMatrix::M_DARKMODULE_LIGHT => false,
\chillerlan\QRCode\Data\QRMatrix::M_DATA => false,
\chillerlan\QRCode\Data\QRMatrix::M_FINDER => false,
\chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR => false,
\chillerlan\QRCode\Data\QRMatrix::M_ALIGNMENT => false,
\chillerlan\QRCode\Data\QRMatrix::M_TIMING => false,
\chillerlan\QRCode\Data\QRMatrix::M_FORMAT => false,
\chillerlan\QRCode\Data\QRMatrix::M_VERSION => false,
\chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE => false,
\chillerlan\QRCode\Data\QRMatrix::M_LOGO => false,
\chillerlan\QRCode\Data\QRMatrix::M_FINDER_DOT_LIGHT => false,
// dark
\chillerlan\QRCode\Data\QRMatrix::M_DARKMODULE => true,
\chillerlan\QRCode\Data\QRMatrix::M_DATA_DARK => true,
\chillerlan\QRCode\Data\QRMatrix::M_FINDER_DARK => true,
\chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR_DARK => true,
\chillerlan\QRCode\Data\QRMatrix::M_ALIGNMENT_DARK => true,
\chillerlan\QRCode\Data\QRMatrix::M_TIMING_DARK => true,
\chillerlan\QRCode\Data\QRMatrix::M_FORMAT_DARK => true,
\chillerlan\QRCode\Data\QRMatrix::M_VERSION_DARK => true,
\chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE_DARK => true,
\chillerlan\QRCode\Data\QRMatrix::M_LOGO_DARK => true,
\chillerlan\QRCode\Data\QRMatrix::M_FINDER_DOT => true,
]
LAYERNAMES
Map of module type => readable name (for CSS etc.)
public
array<string|int, string>
LAYERNAMES
= [
// light
\chillerlan\QRCode\Data\QRMatrix::M_NULL => 'null',
\chillerlan\QRCode\Data\QRMatrix::M_DARKMODULE_LIGHT => 'darkmodule-light',
\chillerlan\QRCode\Data\QRMatrix::M_DATA => 'data',
\chillerlan\QRCode\Data\QRMatrix::M_FINDER => 'finder',
\chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR => 'separator',
\chillerlan\QRCode\Data\QRMatrix::M_ALIGNMENT => 'alignment',
\chillerlan\QRCode\Data\QRMatrix::M_TIMING => 'timing',
\chillerlan\QRCode\Data\QRMatrix::M_FORMAT => 'format',
\chillerlan\QRCode\Data\QRMatrix::M_VERSION => 'version',
\chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE => 'quietzone',
\chillerlan\QRCode\Data\QRMatrix::M_LOGO => 'logo',
\chillerlan\QRCode\Data\QRMatrix::M_FINDER_DOT_LIGHT => 'finder-dot-light',
// dark
\chillerlan\QRCode\Data\QRMatrix::M_DARKMODULE => 'darkmodule',
\chillerlan\QRCode\Data\QRMatrix::M_DATA_DARK => 'data-dark',
\chillerlan\QRCode\Data\QRMatrix::M_FINDER_DARK => 'finder-dark',
\chillerlan\QRCode\Data\QRMatrix::M_SEPARATOR_DARK => 'separator-dark',
\chillerlan\QRCode\Data\QRMatrix::M_ALIGNMENT_DARK => 'alignment-dark',
\chillerlan\QRCode\Data\QRMatrix::M_TIMING_DARK => 'timing-dark',
\chillerlan\QRCode\Data\QRMatrix::M_FORMAT_DARK => 'format-dark',
\chillerlan\QRCode\Data\QRMatrix::M_VERSION_DARK => 'version-dark',
\chillerlan\QRCode\Data\QRMatrix::M_QUIETZONE_DARK => 'quietzone-dark',
\chillerlan\QRCode\Data\QRMatrix::M_LOGO_DARK => 'logo-dark',
\chillerlan\QRCode\Data\QRMatrix::M_FINDER_DOT => 'finder-dot',
]
MIME_TYPE
Note: do not call this constant from the interface, but rather from one of the child classes
public
string
MIME_TYPE
= ''
Tags
MODES
Map of built-in output class FQN
public
array<string|int, string>
MODES
= [\chillerlan\QRCode\Output\QREps::class, \chillerlan\QRCode\Output\QRFpdf::class, \chillerlan\QRCode\Output\QRGdImageAVIF::class, \chillerlan\QRCode\Output\QRGdImageBMP::class, \chillerlan\QRCode\Output\QRGdImageGIF::class, \chillerlan\QRCode\Output\QRGdImageJPEG::class, \chillerlan\QRCode\Output\QRGdImagePNG::class, \chillerlan\QRCode\Output\QRGdImageWEBP::class, \chillerlan\QRCode\Output\QRImagick::class, \chillerlan\QRCode\Output\QRInterventionImage::class, \chillerlan\QRCode\Output\QRMarkupHTML::class, \chillerlan\QRCode\Output\QRMarkupSVG::class, \chillerlan\QRCode\Output\QRMarkupXML::class, \chillerlan\QRCode\Output\QRStringJSON::class, \chillerlan\QRCode\Output\QRStringText::class]
Tags
Methods
dump()
Generates the output, optionally dumps it to a file, and returns it
public
dump([string|null $file = null ]) : mixed
please note that the value of QROptions::$cachefile is already evaluated at this point. if the output module is invoked manually, it has no effect at all. you need to supply the $file parameter here in that case (or handle the option value in your custom output module).
Parameters
- $file : string|null = null
Tags
moduleValueIsValid()
Determines whether the given value is valid
public
static moduleValueIsValid(mixed $value) : bool
Parameters
- $value : mixed