ImageStyleTemplate.php 607 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. namespace Qcloud\Cos\ImageParamTemplate;
  3. class ImageStyleTemplate extends ImageTemplate
  4. {
  5. private $style;
  6. public function __construct() {
  7. parent::__construct();
  8. $this->style = "";
  9. }
  10. public function setStyle($styleName) {
  11. $this->style = "style/" . $styleName;
  12. }
  13. public function getStyle() {
  14. return $this->style;
  15. }
  16. public function queryString() {
  17. $res = "";
  18. if($this->style) {
  19. $res = $this->style;
  20. }
  21. return $res;
  22. }
  23. public function resetRule() {
  24. $this->style = "";
  25. }
  26. }