forked from pacbard/gChartPhp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gQRCode.php
31 lines (29 loc) · 945 Bytes
/
gQRCode.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
<?php
namespace gchart;
class gQRCode extends gChart
{
function __construct($width = 150, $height = 150)
{
$this->setDimensions($width, $height);
$this->setProperty('cht','qr');
}
public function setQRCode($QRCode)
{
$this->setProperty('chl', urlencode($QRCode));
}
/**
* @param $newOutputEncoding String Please refer to the documentation for the acceptable values
*/
public function setOutputEncoding($newOutputEncoding)
{
$this->setProperty('choe', $newOutputEncoding);
}
/**
* @param $newErrorCorrectionLevel String Please refer to the documentation for the acceptable values
* @param $newMargin Integer Please refer to the documentation for the acceptable values
*/
public function setErrorCorrectionLevel($newErrorCorrectionLevel, $newMargin)
{
$this->setProperty('chld', $newErrorCorrectionLevel.'|'.$newMargin);
}
}