Generator instance, keeping the original state intact. Chain as many calls as you need before calling generate() or any data-type method to produce your final QrCodeResult.
style()
string
required
The module style. Accepted values:
float
Optional scaling factor for the module size, between
0.0 and 1.0. Useful
with dot style to add spacing between dots. Defaults to the renderer’s
built-in size.eye()
string
required
Accepted values:
internalEye()
eye() to create composite eye designs.
string
required
Accepted values:
square, circle, pointy — same as eye().eyeColor()
int
required
The index of the eye to color. Accepted values:
0, 1, 2 (top-left,
top-right, bottom-left respectively).string | array
required
Color for the inner square of the eye. Pass a hex string (e.g.
'#e11d48') or an RGB array (e.g. [225, 29, 72]).string | array | null
Color for the outer ring of the eye. Accepts the same formats as
inner.
When null, the outer ring inherits the global foreground color set by
color().size()
int
required
Pixel dimensions for both width and height. The default from the package
config is
400.margin()
4 modules is recommended by the QR specification for reliable scanning.
int
required
Margin thickness in pixels. The package default is
4.format()
string
required
Accepted values:
encoding()
UTF-8, which handles most use cases including multibyte characters.
string
required
Any valid PHP character encoding string, such as
UTF-8, ISO-8859-1, or
Shift_JIS.errorCorrection()
string
required
Accepted values: