初始化仓库
This commit is contained in:
39
vendor/qcloud/cos-sdk-v5/src/ImageParamTemplate/CIParamTransformation.php
vendored
Normal file
39
vendor/qcloud/cos-sdk-v5/src/ImageParamTemplate/CIParamTransformation.php
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
namespace Qcloud\Cos\ImageParamTemplate;
|
||||
|
||||
class CIParamTransformation extends ImageTemplate{
|
||||
|
||||
private $tranParams;
|
||||
private $tranString;
|
||||
private $spilt;
|
||||
|
||||
public function __construct($spilt = "|") {
|
||||
parent::__construct();
|
||||
$this->spilt = $spilt;
|
||||
$this->tranParams = array();
|
||||
$this->tranString = "";
|
||||
}
|
||||
|
||||
public function addRule(ImageTemplate $template) {
|
||||
if($template->queryString()){
|
||||
$this->tranParams[] = $template->queryString();
|
||||
}
|
||||
}
|
||||
|
||||
public function queryString() {
|
||||
if($this->tranParams) {
|
||||
$this->tranString = implode($this->spilt, $this->tranParams);
|
||||
}
|
||||
return $this->tranString;
|
||||
}
|
||||
|
||||
public function resetRule() {
|
||||
$this->tranParams = array();
|
||||
$this->tranString = "";
|
||||
}
|
||||
|
||||
public function defineRule($value) {
|
||||
$this->tranParams[] = $value;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user