QRString
extends QROutputAbstract
in package
Converts the matrix data into string types
Table of Contents
- $defaultMode : string
- the default output mode of the current output module
- $length : int
- the side length of the QR image (modules * scale)
- $matrix : QRMatrix
- the (filled) data matrix object
- $moduleCount : int
- the current size of the QR matrix
- $moduleValues : array<string|int, mixed>
- an (optional) array of color values for the several QR matrix parts
- $options : SettingsContainerInterface
- $outputMode : string
- the current output mode
- $scale : int
- the current scaling for a QR pixel
- __construct() : mixed
- QROutputAbstract constructor.
- dump() : mixed
- generates the output, optionally dumps it to a file, and returns it
- base64encode() : string
- Returns a base64 data URI for the given string and mime type
- json() : string
- JSON output
- saveToFile() : bool
- saves the qr data to a file
- setModuleValues() : void
- Sets the initial module values (clean-up & defaults)
- text() : string
- string output
Properties
$defaultMode
the default output mode of the current output module
protected
string
$defaultMode
= chillerlanQRCodeQRCode::OUTPUT_STRING_TEXT
$length
the side length of the QR image (modules * scale)
protected
int
$length
$matrix
the (filled) data matrix object
protected
QRMatrix
$matrix
$moduleCount
the current size of the QR matrix
protected
int
$moduleCount
Tags
$moduleValues
an (optional) array of color values for the several QR matrix parts
protected
array<string|int, mixed>
$moduleValues
$options
protected
SettingsContainerInterface
$options
$outputMode
the current output mode
protected
string
$outputMode
Tags
$scale
the current scaling for a QR pixel
protected
int
$scale
Tags
Methods
__construct()
QROutputAbstract constructor.
public
__construct(SettingsContainerInterface $options, QRMatrix $matrix) : mixed
Parameters
- $options : SettingsContainerInterface
- $matrix : QRMatrix
Return values
mixed —dump()
generates the output, optionally dumps it to a file, and returns it
public
dump([string $file = null ]) : mixed
Parameters
- $file : string = null
Tags
Return values
mixed —base64encode()
Returns a base64 data URI for the given string and mime type
protected
base64encode(string $data, string $mime) : string
Parameters
- $data : string
- $mime : string
Return values
string —json()
JSON output
protected
json([string $file = null ]) : string
Parameters
- $file : string = null
Return values
string —saveToFile()
saves the qr data to a file
protected
saveToFile(string $data, string $file) : bool
Parameters
- $data : string
- $file : string
Tags
Return values
bool —setModuleValues()
Sets the initial module values (clean-up & defaults)
protected
setModuleValues() : void
Tags
Return values
void —text()
string output
protected
text([string $file = null ]) : string
Parameters
- $file : string = null