-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathQRCode.php
More file actions
103 lines (79 loc) · 2 KB
/
QRCode.php
File metadata and controls
103 lines (79 loc) · 2 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
/**
* This file is part of PhpAidc LabelPrinter package.
*
* © Appwilio (https://appwilio.com)
* © JhaoDa (https://github.com/jhaoda)
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace PhpAidc\LabelPrinter\Command;
use PhpAidc\LabelPrinter\Contract\Command;
use PhpAidc\LabelPrinter\Command\Concerns\Alignable;
use PhpAidc\LabelPrinter\Command\Concerns\Rotatable;
use PhpAidc\LabelPrinter\Command\Concerns\PositionAware;
final class QRCode implements Command
{
use Alignable;
use Rotatable;
use PositionAware;
/** @var int|null */
private $cellWidth;
/** @var string */
private $data;
/** @var string|null */
private $eccLevel;
/** @var int|null */
private $height;
/** @var int|null */
private $magnification;
/** @var string|null */
private $mode;
/** @var string|null */
private $model;
public function __construct(int $x, int $y, string $data, string $eccLevel, int $cellWidth, string $mode)
{
$this->x = $x;
$this->y = $y;
$this->data = $data;
$this->cellWidth = $cellWidth;
$this->eccLevel = $eccLevel;
$this->mode = $mode;
}
public function magnify(int $value)
{
$this->magnification = $value;
return $this;
}
public function model(string $value)
{
$this->model = $value;
return $this;
}
public function getCellWidth(): ?int
{
return $this->cellWidth;
}
public function getData(): string
{
return $this->data;
}
public function getECCLevel(): string
{
return $this->eccLevel;
}
public function getMagnification(): ?int
{
return $this->magnification;
}
public function getMode(): ?string
{
return $this->mode;
}
public function getModel(): ?string
{
return $this->model;
}
}