/**
  * 生成私有地址
  * @param srting $baseUrl 基础URL
  */
 public function MakePrivateUrl($baseUrl)
 {
     $deadline = $this->Expires;
     if ($deadline == 0) {
         $deadline = 3600;
     }
     $deadline += time();
     $pos = strpos($baseUrl, '?');
     if ($pos !== false) {
         $baseUrl .= '&e=';
     } else {
         $baseUrl .= '?e=';
     }
     $baseUrl .= $deadline;
     $token = parent::Sign($baseUrl);
     return "{$baseUrl}&token={$token}";
 }
 public function get_RS_URICopy($bucketSrc, $keySrc, $bucketDest, $keyDest)
 {
     return '/copy/' . parent::SafeBaseEncode("{$bucketSrc}:{$keySrc}") . '/' . parent::SafeBaseEncode("{$bucketDest}:{$keyDest}");
 }
 public function __construct($params = '')
 {
     parent::__construct();
 }
 protected function _make_watermark_Request($url)
 {
     $ops = array();
     if (!empty($this->WaterMode)) {
         $ops[] = $this->WaterMode;
         if ($this->WaterMode == 1) {
             if (!empty($this->Waterimageurl)) {
                 $ops[] = 'image/' . parent::SafeBaseEncode($this->Waterimageurl);
             }
         }
         if ($this->WaterMode == 2) {
             if (!empty($this->Text)) {
                 $ops[] = 'text/' . parent::SafeBaseEncode($this->Text);
             }
             if (!empty($this->Font)) {
                 if (preg_match("/[^a-zA-Z]/", $this->Font)) {
                     $ops[] = 'font/' . parent::SafeBaseEncode($this->Font);
                 } else {
                     $ops[] = 'font/' . $this->Font;
                 }
             }
             if (!empty($this->Fontsize)) {
                 $ops[] = 'fontsize/' . $this->Fontsize;
             }
             if (!empty($this->Fill)) {
                 $ops[] = 'fill/' . parent::SafeBaseEncode($this->Fill);
             }
         }
         if (!empty($this->Dissolv)) {
             $ops[] = 'dissolve/' . $this->Dissolve;
         }
         if (!empty($this->Gravity)) {
             $ops[] = 'gravity/' . $this->Gravity;
         }
         if (!empty($this->Dx)) {
             $ops[] = 'dx/' . $this->Dx;
         }
         if (!empty($this->Dy)) {
             $ops[] = 'dy/' . $this->Dy;
         }
     }
     return $url . "?watermark/" . implode('/', $ops);
 }