Debian Codegraph @

vendor/endroid/qr-code/src/Logo/Logo.php

raw
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Endroid\QrCode\Logo;
6
7 final class Logo implements LogoInterface
8 {
9 public function __construct(
10 private string $path,
11 private int|null $resizeToWidth = null,
12 private int|null $resizeToHeight = null,
13 private bool $punchoutBackground = false
14 ) {
15 }
16
17 public static function create(string $path): self
18 {
19 return new self($path);
20 }
21
22 public function getPath(): string
23 {
24 return $this->path;
25 }
26
27 public function setPath(string $path): self
28 {
29 $this->path = $path;
30
31 return $this;
32 }
33
34 public function getResizeToWidth(): int|null
35 {
36 return $this->resizeToWidth;
37 }
38
39 public function setResizeToWidth(int|null $resizeToWidth): self
40 {
41 $this->resizeToWidth = $resizeToWidth;
42
43 return $this;
44 }
45
46 public function getResizeToHeight(): int|null
47 {
48 return $this->resizeToHeight;
49 }
50
51 public function setResizeToHeight(int|null $resizeToHeight): self
52 {
53 $this->resizeToHeight = $resizeToHeight;
54
55 return $this;
56 }
57
58 public function getPunchoutBackground(): bool
59 {
60 return $this->punchoutBackground;
61 }
62
63 public function setPunchoutBackground(bool $punchoutBackground): self
64 {
65 $this->punchoutBackground = $punchoutBackground;
66
67 return $this;
68 }
69 }