Property | Type | Description | |
---|---|---|---|
$encoding | string | Holds the Encoder mode to encode a QrCode. | |
$errorCorrection | BaconQrCode\Common\ErrorCorrectionLevel | Holds the QrCode error correction levels. This is stored by using the BaconQrCode ErrorCorrectionLevel class constants. | |
$imageMerge | null | string | Holds an image string that will be merged with the QrCode. | |
$imagePercentage | float | The percentage that a merged image should take over the source image. | |
$writer | BaconQrCode\Writer | Holds the BaconQrCode Writer Object. |
Method | Description | |
---|---|---|
__call ( $method, $arguments ) | Creates a new datatype object and then generates a QrCode. | |
__construct ( BaconQrCode\Writer $writer = null, BaconQrCode\Renderer\Image\RendererInterface $format = null ) | Creates a new QrCodeGenerator with a Writer class and with a SVG renderer set as the default. | |
backgroundColor ( integer $red, integer $green, integer $blue ) | Changes the background color of a QrCode. | |
color ( integer $red, integer $green, integer $blue ) | Changes the foreground color of a QrCode. | |
encoding ( string $encoding ) | Sets the Encoding mode. | |
errorCorrection ( string $level ) | Changes the error correction level of a QrCode. | |
format ( string $format ) | Switches the format of the outputted QrCode or defaults to SVG. | |
generate ( string $text, null | string $filename = null ) : string | void | Generates a QrCode. | |
margin ( integer $margin ) | Creates a margin around the QrCode. | |
merge ( $filepath, $percentage = 0.2, $absolute = false ) | Merges an image with the center of the QrCode. | |
mergeString ( $content, $percentage = 0.2 ) | Merges an image string with the center of the QrCode, does not check for correct format. | |
size ( integer $pixels ) | Changes the size of the QrCode. |
Method | Description | |
---|---|---|
createClass ( string $method ) : SimpleSoftwareIO\QrCode\DataTypes\DataTypeInterface | Creates a new DataType class dynamically. | |
formatClass ( $method ) : string | Formats the method name correctly. |
public __call ( $method, $arguments ) | ||
$method | ||
$arguments |
public __construct ( BaconQrCode\Writer $writer = null, BaconQrCode\Renderer\Image\RendererInterface $format = null ) | ||
$writer | BaconQrCode\Writer | |
$format | BaconQrCode\Renderer\Image\RendererInterface |
public errorCorrection ( string $level ) | ||
$level | string | Desired error correction level. L = 7% M = 15% Q = 25% H = 30% |
public merge ( $filepath, $percentage = 0.2, $absolute = false ) | ||
$filepath | string The filepath to an image | |
$percentage | float The amount that the merged image should be placed over the qrcode. | |
$absolute | boolean Whether to use an absolute filepath or not. |
public mergeString ( $content, $percentage = 0.2 ) | ||
$content | string The string contents of an image. | |
$percentage | float The amount that the merged image should be placed over the qrcode. |
protected string $encoding | ||
return | string |
protected ErrorCorrectionLevel,BaconQrCode\Common $errorCorrection | ||
return | BaconQrCode\Common\ErrorCorrectionLevel |
protected float $imagePercentage | ||
return | float |