\BaconQrCode\Renderer\TextHtml

Html renderer.

Summary

Methods
Properties
Constants
setFullBlock()
getFullBlock()
setEmptyBlock()
getEmptyBlock()
setMargin()
getMargin()
render()
setClass()
getClass()
setStyle()
getStyle()
No public properties found
No constants found
No protected methods found
$margin
$fullBlock
$emptyBlock
$class
$style
N/A
No private methods found
No private properties found
N/A

Properties

$margin

$margin : integer

Margin around the QR code, also known as quiet zone.

Type

integer

$fullBlock

$fullBlock : string

Char used for full block.

UTF-8 FULL BLOCK (U+2588)

Type

string

$emptyBlock

$emptyBlock : string

Char used for empty space

Type

string

$class

$class : string

HTML CSS class attribute value.

Type

string

$style

$style : string

HTML CSS style definition for the code element.

Type

string

Methods

setFullBlock()

setFullBlock(string  $fullBlock) 

Set char used as full block (occupied space, "black").

Parameters

string $fullBlock

getFullBlock()

getFullBlock() : string

Get char used as full block (occupied space, "black").

Returns

string

setEmptyBlock()

setEmptyBlock(string  $emptyBlock) 

Set char used as empty block (empty space, "white").

Parameters

string $emptyBlock

getEmptyBlock()

getEmptyBlock() : string

Get char used as empty block (empty space, "white").

Returns

string

setMargin()

setMargin(integer  $margin) : \BaconQrCode\Renderer\Text\AbstractRenderer

Sets the margin around the QR code.

Parameters

integer $margin

Throws

\BaconQrCode\Exception\InvalidArgumentException

Returns

\BaconQrCode\Renderer\Text\AbstractRenderer

getMargin()

getMargin() : integer

Gets the margin around the QR code.

Returns

integer

render()

render(\BaconQrCode\Encoder\QrCode  $qrCode) : string

render(): defined by RendererInterface.

Parameters

\BaconQrCode\Encoder\QrCode $qrCode

Returns

string

setClass()

setClass(string  $class) 

Set CSS class name.

Parameters

string $class

getClass()

getClass() : string

Get CSS class name.

Returns

string

setStyle()

setStyle(string  $style) 

Set CSS style value.

Parameters

string $style

getStyle()

getStyle() : string

Get CSS style value.

Returns

string