FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
qr-code/src/QrCode.php at main · endroid/qr-code · GitHub
endroid
/
qr-code
Public
Uh oh!
There was an error while loading.
Please reload this page
.
Notifications
You must be signed in to change notification settings
Fork
768
Star
4.8k
Code
Issues
8
Pull requests
6
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
qr-code
/
src
/
QrCode.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
65 lines (53 loc) · 1.57 KB
Breadcrumbs
qr-code
/
src
/
QrCode.php
Copy path
File metadata and controls
65 lines (53 loc) · 1.57 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<?php
declare
(strict_types=
1
);
namespace
Endroid
\
QrCode
;
use
Endroid
\
QrCode
\
Color
\
Color
;
use
Endroid
\
QrCode
\
Color
\
ColorInterface
;
use
Endroid
\
QrCode
\
Encoding
\
Encoding
;
use
Endroid
\
QrCode
\
Encoding
\
EncodingInterface
;
final
readonly
class
QrCode
implements
QrCodeInterface
{
public
function
__construct
(
private
string
$
data
,
private
EncodingInterface
$
encoding
=
new
Encoding
(
'
UTF-8
'
),
private
ErrorCorrectionLevel
$
errorCorrectionLevel
= ErrorCorrectionLevel::Low,
private
int
$
size
=
300
,
private
int
$
margin
=
10
,
private
RoundBlockSizeMode
$
roundBlockSizeMode
= RoundBlockSizeMode::Margin,
private
ColorInterface
$
foregroundColor
=
new
Color
(
0
,
0
,
0
),
private
ColorInterface
$
backgroundColor
=
new
Color
(
255
,
255
,
255
),
) {
}
public
function
getData
():
string
{
return
$
this
->
data
;
}
public
function
getEncoding
():
EncodingInterface
{
return
$
this
->
encoding
;
}
public
function
getErrorCorrectionLevel
():
ErrorCorrectionLevel
{
return
$
this
->
errorCorrectionLevel
;
}
public
function
getSize
():
int
{
return
$
this
->
size
;
}
public
function
getMargin
():
int
{
return
$
this
->
margin
;
}
public
function
getRoundBlockSizeMode
():
RoundBlockSizeMode
{
return
$
this
->
roundBlockSizeMode
;
}
public
function
getForegroundColor
():
ColorInterface
{
return
$
this
->
foregroundColor
;
}
public
function
getBackgroundColor
():
ColorInterface
{
return
$
this
->
backgroundColor
;
}
}
Back
|
FazBrowse Home
|
New Git URL