Documentation

BaconQrCodeProvider
in package
implements IQRCodeProvider

Interfaces, Classes, Traits and Enums

IQRCodeProvider

Table of Contents

$backgroundColour  : mixed
$borderWidth  : mixed
$foregroundColour  : mixed
$format  : mixed
__construct()  : mixed
Ensure we using the latest Bacon QR Code and specify default options
getMimeType()  : string
Standard functions from IQRCodeProvider
getQRCodeImage()  : string
Generate and return the QR code to embed in a web page
getQRCodeByBackend()  : mixed
Abstract QR code generation function providing colour changing support
handleColour()  : mixed
Ensure colour is an array of three values but also accept a string and assume its a 3 or 6 character hex

Properties

Methods

__construct()

Ensure we using the latest Bacon QR Code and specify default options

public __construct([int $borderWidth = 4 ][, string $backgroundColour = '#ffffff' ][, string $foregroundColour = '#000000' ][, string $format = 'png' ]) : mixed
Parameters
$borderWidth : int = 4

space around the QR code, 4 is the default from Bacon QR Code

$backgroundColour : string = '#ffffff'

hex reference for the background colour

$foregroundColour : string = '#000000'

hex reference for the foreground colour

$format : string = 'png'

the desired output, png or svg

Return values
mixed

getMimeType()

Standard functions from IQRCodeProvider

public getMimeType() : string
Return values
string

getQRCodeImage()

Generate and return the QR code to embed in a web page

public getQRCodeImage(mixed $qrText, mixed $size) : string
Parameters
$qrText : mixed
$size : mixed

the desired size of the QR code

Return values
string

file contents of the QR code

handleColour()

Ensure colour is an array of three values but also accept a string and assume its a 3 or 6 character hex

private handleColour(mixed $colour) : mixed
Parameters
$colour : mixed
Return values
mixed

Search results