forked from endroid/qr-code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Logo.php
74 lines (57 loc) · 1.59 KB
/
Logo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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;
}
}