Constants

LABEL_FONT_PATH_DEFAULT

LABEL_FONT_PATH_DEFAULT = __DIR__ . '/../assets/noto_sans.otf'

Properties

$text

$text : string

Type

string

$size

$size : integer

Type

integer

$margin

$margin : integer

Type

integer

$foregroundColor

$foregroundColor : array

Type

array

$backgroundColor

$backgroundColor : array

Type

array

$encoding

$encoding : string

Type

string

$logoPath

$logoPath : string

Type

string

$logoWidth

$logoWidth : integer

Type

integer

$label

$label : string

Type

string

$labelFontSize

$labelFontSize : integer

Type

integer

$labelFontPath

$labelFontPath : string

Type

string

$labelMargin

$labelMargin : array

Type

array

$validateResult

$validateResult : boolean

Type

boolean

Methods

__construct()

__construct(string  $text = '') 

Parameters

string $text

setText()

setText(string  $text) : $this

Parameters

string $text

Returns

$this

getText()

getText() : string

Returns

string

setSize()

setSize(integer  $size) : $this

Parameters

integer $size

Returns

$this

getSize()

getSize() : integer

Returns

integer

setMargin()

setMargin(integer  $margin) : $this

Parameters

integer $margin

Returns

$this

getMargin()

getMargin() : integer

Returns

integer

setForegroundColor()

setForegroundColor(array  $foregroundColor) : $this

Parameters

array $foregroundColor

Returns

$this

getForegroundColor()

getForegroundColor() : array<mixed,integer>

Returns

array<mixed,integer>

setBackgroundColor()

setBackgroundColor(array  $backgroundColor) : $this

Parameters

array $backgroundColor

Returns

$this

getBackgroundColor()

getBackgroundColor() : array<mixed,integer>

Returns

array<mixed,integer>

setEncoding()

setEncoding(string  $encoding) : $this

Parameters

string $encoding

Returns

$this

getEncoding()

getEncoding() : string

Returns

string

setErrorCorrectionLevel()

setErrorCorrectionLevel(string  $errorCorrectionLevel) : $this

Parameters

string $errorCorrectionLevel

Returns

$this

getErrorCorrectionLevel()

getErrorCorrectionLevel() : string

Returns

string

setLogoPath()

setLogoPath(string  $logoPath) : $this

Parameters

string $logoPath

Throws

\Endroid\QrCode\Exception\InvalidPathException

Returns

$this

getLogoPath()

getLogoPath() : string

Returns

string

setLogoWidth()

setLogoWidth(integer  $logoWidth) : $this

Parameters

integer $logoWidth

Returns

$this

getLogoWidth()

getLogoWidth() : integer

Returns

integer

setLabel()

setLabel(string  $label, integer  $labelFontSize = null, string  $labelFontPath = null, string  $labelAlignment = null, array  $labelMargin = null) : $this

Parameters

string $label
integer $labelFontSize
string $labelFontPath
string $labelAlignment
array $labelMargin

Returns

$this

getLabel()

getLabel() : string

Returns

string

setLabelFontSize()

setLabelFontSize(integer  $labelFontSize) : $this

Parameters

integer $labelFontSize

Returns

$this

getLabelFontSize()

getLabelFontSize() : integer

Returns

integer

setLabelFontPath()

setLabelFontPath(string  $labelFontPath) : $this

Parameters

string $labelFontPath

Throws

\Endroid\QrCode\Exception\InvalidPathException

Returns

$this

getLabelFontPath()

getLabelFontPath() : string

Returns

string

setLabelAlignment()

setLabelAlignment(string  $labelAlignment) : $this

Parameters

string $labelAlignment

Returns

$this

getLabelAlignment()

getLabelAlignment() : string

Returns

string

setLabelMargin()

setLabelMargin(array<mixed,integer>  $labelMargin) : $this

Parameters

array<mixed,integer> $labelMargin

Returns

$this

getLabelMargin()

getLabelMargin() : array<mixed,integer>

Returns

array<mixed,integer>

setWriterByName()

setWriterByName(string  $name) : $this

Parameters

string $name

Throws

\Endroid\QrCode\Exception\InvalidWriterException

Returns

$this

setWriterByPath()

setWriterByPath(string  $path) : $this

Parameters

string $path

Returns

$this

setWriterByExtension()

setWriterByExtension(string  $extension) : $this

Parameters

string $extension

Throws

\Endroid\QrCode\Exception\UnsupportedExtensionException

Returns

$this

setValidateResult()

setValidateResult(boolean  $validateResult) : $this

Parameters

boolean $validateResult

Returns

$this

getValidateResult()

getValidateResult() : boolean

Returns

boolean

writeString()

writeString() : string

Returns

string

writeDataUri()

writeDataUri() : string

Returns

string

writeFile()

writeFile(string  $path) 

Parameters

string $path

getContentType()

getContentType() : string

Throws

\Endroid\QrCode\Exception\InvalidWriterException

Returns

string