feat: add QRCode definition
This commit is contained in:
32
src/Entity/QRCode/QRCodeQROptions.php
Normal file
32
src/Entity/QRCode/QRCodeQROptions.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Entity\QRCode;
|
||||
|
||||
/**
|
||||
* Options for generating QR code
|
||||
*/
|
||||
readonly class QRCodeQROptions {
|
||||
private int $scale;
|
||||
private int $margin;
|
||||
|
||||
/**
|
||||
* @param int $scale scaling of png image (2 = 1px is mapped onto 2px, 3 = 1px onto 3px etc.)
|
||||
* @param int $margin white borders of png image in pixels
|
||||
*/
|
||||
public function __construct(int $scale, int $margin)
|
||||
{
|
||||
$this->scale = $scale;
|
||||
$this->margin = $margin;
|
||||
}
|
||||
|
||||
public function getScale(): int
|
||||
{
|
||||
return $this->scale;
|
||||
}
|
||||
|
||||
public function getMargin(): int
|
||||
{
|
||||
return $this->margin;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user