Documentation

Writer
in package

QR code writer.

Table of Contents

$renderer  : RendererInterface
Renderer instance.
__construct()  : mixed
Creates a new writer with a specific renderer.
writeFile()  : void
Writes QR code to a file.
writeString()  : string
Writes QR code and returns it as string.

Properties

Methods

writeFile()

Writes QR code to a file.

public writeFile(string $content, string $filename[, string $encoding = Encoder::DEFAULT_BYTE_MODE_ECODING ][, ErrorCorrectionLevel|null $ecLevel = null ][, Version|null $forcedVersion = null ]) : void
Parameters
$content : string
$filename : string
$encoding : string = Encoder::DEFAULT_BYTE_MODE_ECODING
$ecLevel : ErrorCorrectionLevel|null = null
$forcedVersion : Version|null = null
Tags
see
Writer::writeString()
Return values
void

writeString()

Writes QR code and returns it as string.

public writeString(string $content[, string $encoding = Encoder::DEFAULT_BYTE_MODE_ECODING ][, ErrorCorrectionLevel|null $ecLevel = null ][, Version|null $forcedVersion = null ]) : string

Content is a string which should be encoded in UTF-8, in case there are non ASCII-characters present.

Parameters
$content : string
$encoding : string = Encoder::DEFAULT_BYTE_MODE_ECODING
$ecLevel : ErrorCorrectionLevel|null = null
$forcedVersion : Version|null = null
Tags
throws
InvalidArgumentException

if the content is empty

Return values
string

Search results