提交的内容
This commit is contained in:
60
vendor/qcloud/cos-sdk-v5/src/ImageParamTemplate/ImageQrcodeTemplate.php
vendored
Executable file → Normal file
60
vendor/qcloud/cos-sdk-v5/src/ImageParamTemplate/ImageQrcodeTemplate.php
vendored
Executable file → Normal file
@ -4,34 +4,68 @@ namespace Qcloud\Cos\ImageParamTemplate;
|
||||
|
||||
class ImageQrcodeTemplate extends ImageTemplate
|
||||
{
|
||||
private $mode;
|
||||
private $cover;
|
||||
private $barType;
|
||||
private $segment;
|
||||
private $size;
|
||||
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
$this->mode = "";
|
||||
$this->cover = "";
|
||||
$this->barType = "";
|
||||
$this->segment = "";
|
||||
$this->size = "";
|
||||
}
|
||||
|
||||
public function setMode($mode) {
|
||||
$this->mode = "/cover/" . $mode;
|
||||
public function setCover($cover) {
|
||||
$this->cover = "/cover/" . $cover;
|
||||
}
|
||||
public function getCover() {
|
||||
return $this->cover;
|
||||
}
|
||||
|
||||
public function getMode() {
|
||||
return $this->mode;
|
||||
public function setBarType($barType) {
|
||||
$this->barType = "/bar-type/" . $barType;
|
||||
}
|
||||
public function getBarType() {
|
||||
return $this->barType;
|
||||
}
|
||||
|
||||
public function setSegment($segment) {
|
||||
$this->segment = "/segmente/" . $segment;
|
||||
}
|
||||
public function getSegment() {
|
||||
return $this->segment;
|
||||
}
|
||||
|
||||
public function setSize($size) {
|
||||
$this->size = "/size/" . $size;
|
||||
}
|
||||
public function getSize() {
|
||||
return $this->size;
|
||||
}
|
||||
|
||||
public function queryString() {
|
||||
$head = "QRcode";
|
||||
$res = "";
|
||||
if($this->mode) {
|
||||
$res .= $this->mode;
|
||||
$res = "QRcode";
|
||||
if($this->cover) {
|
||||
$res .= $this->cover;
|
||||
}
|
||||
if($res) {
|
||||
$res = $head . $res;
|
||||
if($this->barType) {
|
||||
$res .= $this->barType;
|
||||
}
|
||||
if($this->segment) {
|
||||
$res .= $this->segment;
|
||||
}
|
||||
if($this->size) {
|
||||
$res .= $this->size;
|
||||
}
|
||||
return $res;
|
||||
}
|
||||
|
||||
public function resetRule() {
|
||||
$this->mode = "";
|
||||
$this->cover = "";
|
||||
$this->barType = "";
|
||||
$this->segment = "";
|
||||
$this->size = "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user