Documentation

QROutputInterface

Converts the data matrix into readable output

Table of Contents

Constants

CUSTOM  = 'custom'
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
EPS  = 'eps'
FPDF  = 'fpdf'
GDIMAGE_BMP  = 'bmp'
GDIMAGE_GIF  = 'gif'
GDIMAGE_JPG  = 'jpg'
GDIMAGE_PNG  = 'png'
GDIMAGE_WEBP  = 'webp'
IMAGICK  = 'imagick'
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.)
MARKUP_HTML  = 'html'
MARKUP_SVG  = 'svg'
MODES  = [self::MARKUP_SVG => \chillerlan\QRCode\Output\QRMarkupSVG::class, self::MARKUP_HTML => \chillerlan\QRCode\Output\QRMarkupHTML::class, self::GDIMAGE_BMP => \chillerlan\QRCode\Output\QRGdImage::class, self::GDIMAGE_GIF => \chillerlan\QRCode\Output\QRGdImage::class, self::GDIMAGE_JPG => \chillerlan\QRCode\Output\QRGdImage::class, self::GDIMAGE_PNG => \chillerlan\QRCode\Output\QRGdImage::class, self::GDIMAGE_WEBP => \chillerlan\QRCode\Output\QRGdImage::class, self::STRING_JSON => \chillerlan\QRCode\Output\QRString::class, self::STRING_TEXT => \chillerlan\QRCode\Output\QRString::class, self::IMAGICK => \chillerlan\QRCode\Output\QRImagick::class, self::FPDF => \chillerlan\QRCode\Output\QRFpdf::class, self::EPS => \chillerlan\QRCode\Output\QREps::class]
Map of built-in output modes => class FQN
STRING_JSON  = 'json'
STRING_TEXT  = 'text'

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', ]

MODES

Map of built-in output modes => class FQN

public array<string|int, string> MODES = [self::MARKUP_SVG => \chillerlan\QRCode\Output\QRMarkupSVG::class, self::MARKUP_HTML => \chillerlan\QRCode\Output\QRMarkupHTML::class, self::GDIMAGE_BMP => \chillerlan\QRCode\Output\QRGdImage::class, self::GDIMAGE_GIF => \chillerlan\QRCode\Output\QRGdImage::class, self::GDIMAGE_JPG => \chillerlan\QRCode\Output\QRGdImage::class, self::GDIMAGE_PNG => \chillerlan\QRCode\Output\QRGdImage::class, self::GDIMAGE_WEBP => \chillerlan\QRCode\Output\QRGdImage::class, self::STRING_JSON => \chillerlan\QRCode\Output\QRString::class, self::STRING_TEXT => \chillerlan\QRCode\Output\QRString::class, self::IMAGICK => \chillerlan\QRCode\Output\QRImagick::class, self::FPDF => \chillerlan\QRCode\Output\QRFpdf::class, self::EPS => \chillerlan\QRCode\Output\QREps::class]

Methods

dump()

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

public dump([string $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
Tags
see
QRCode::renderMatrix()

moduleValueIsValid()

Determines whether the given value is valid

public static moduleValueIsValid(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

        
On this page

Search results