Use composer and change QR code generation library
This commit is contained in:
parent
6832804dc0
commit
147a25c93f
564 changed files with 15838 additions and 34258 deletions
74
vendor/endroid/qr-code/src/Logo/Logo.php
vendored
Normal file
74
vendor/endroid/qr-code/src/Logo/Logo.php
vendored
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Endroid\QrCode\Logo;
|
||||
|
||||
final class Logo implements LogoInterface
|
||||
{
|
||||
private string $path;
|
||||
private ?int $resizeToWidth;
|
||||
private ?int $resizeToHeight;
|
||||
private bool $punchoutBackground;
|
||||
|
||||
public function __construct(string $path, ?int $resizeToWidth = null, ?int $resizeToHeight = null, bool $punchoutBackground = false)
|
||||
{
|
||||
$this->path = $path;
|
||||
$this->resizeToWidth = $resizeToWidth;
|
||||
$this->resizeToHeight = $resizeToHeight;
|
||||
$this->punchoutBackground = $punchoutBackground;
|
||||
}
|
||||
|
||||
public static function create(string $path): self
|
||||
{
|
||||
return new self($path);
|
||||
}
|
||||
|
||||
public function getPath(): string
|
||||
{
|
||||
return $this->path;
|
||||
}
|
||||
|
||||
public function setPath(string $path): self
|
||||
{
|
||||
$this->path = $path;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getResizeToWidth(): ?int
|
||||
{
|
||||
return $this->resizeToWidth;
|
||||
}
|
||||
|
||||
public function setResizeToWidth(?int $resizeToWidth): self
|
||||
{
|
||||
$this->resizeToWidth = $resizeToWidth;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getResizeToHeight(): ?int
|
||||
{
|
||||
return $this->resizeToHeight;
|
||||
}
|
||||
|
||||
public function setResizeToHeight(?int $resizeToHeight): self
|
||||
{
|
||||
$this->resizeToHeight = $resizeToHeight;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPunchoutBackground(): bool
|
||||
{
|
||||
return $this->punchoutBackground;
|
||||
}
|
||||
|
||||
public function setPunchoutBackground(bool $punchoutBackground): self
|
||||
{
|
||||
$this->punchoutBackground = $punchoutBackground;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue