ImageQrcodeTemplate.php 679 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. namespace Qcloud\Cos\ImageParamTemplate;
  3. class ImageQrcodeTemplate extends ImageTemplate
  4. {
  5. private $mode;
  6. public function __construct() {
  7. parent::__construct();
  8. $this->mode = "";
  9. }
  10. public function setMode($mode) {
  11. $this->mode = "/cover/" . $mode;
  12. }
  13. public function getMode() {
  14. return $this->mode;
  15. }
  16. public function queryString() {
  17. $head = "QRcode";
  18. $res = "";
  19. if($this->mode) {
  20. $res .= $this->mode;
  21. }
  22. if($res) {
  23. $res = $head . $res;
  24. }
  25. return $res;
  26. }
  27. public function resetRule() {
  28. $this->mode = "";
  29. }
  30. }