Documentation

QRFpdf extends QROutputAbstract
in package

QRFpdf output module (requires fpdf)

Tags
see
https://github.com/Setasign/FPDF
see
http://www.fpdf.org/

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
QRFpdf constructor.
dump()  : string|FPDF
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
saveToFile()  : bool
saves the qr data to a file
setModuleValues()  : void
Sets the initial module values (clean-up & defaults)

Properties

$defaultMode

the default output mode of the current output module

protected string $defaultMode

$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<string|int, mixed> $moduleValues

$outputMode

the current output mode

protected string $outputMode
Tags
see
QROptions::$outputType

$scale

the current scaling for a QR pixel

protected int $scale
Tags
see
QROptions::$scale

Methods

__construct()

QRFpdf constructor.

public __construct(SettingsContainerInterface $options, QRMatrix $matrix) : mixed
Parameters
$options : SettingsContainerInterface
$matrix : QRMatrix
Tags
throws
QRCodeOutputException
Return values
mixed

dump()

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

public dump([string $file = null ]) : string|FPDF
Parameters
$file : string = null
Tags
inheritDoc
Return values
string|FPDF

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

saveToFile()

saves the qr data to a file

protected saveToFile(string $data, string $file) : bool
Parameters
$data : string
$file : string
Tags
see
file_put_contents()
see
QROptions::cachefile
throws
QRCodeOutputException
Return values
bool

setModuleValues()

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

protected setModuleValues() : void
Tags
inheritDoc
Return values
void

Search results