Exemple #1
0
 /**
  * 保存操作,当包含_id时更新对应的_id所对应的文档,否则创建新的文档。
  *
  * @param array $datas            
  * @return array
  */
 public function save($datas)
 {
     try {
         return $this->result($this->_client->save(serialize($datas)));
     } catch (SoapFault $e) {
         $this->soapFaultMsg($e);
         return false;
     }
 }
 /**
  * 保存图片
  * @param  string  $imgname   图片保存名称
  * @param  string  $type      图片类型
  * @param  integer $quality   图像质量      
  * @param  boolean $interlace 是否对JPEG类型图片设置隔行扫描
  * @return Object             当前图片处理库对象
  */
 public function save($imgname, $type = null, $quality = 100, $interlace = true)
 {
     $this->img->save($imgname, $type, $quality, $interlace);
     //同步图片到腾讯云Cos
     //$imgname = realpath(dirname($imgname)) . '/' . basename($imgname); //强制绝对路径
     defined('ROOT') || define('ROOT', dirname(dirname(dirname(__FILE__))));
     include_once ROOT . '/gb_php/to8to_file.fun.php';
     to8to_putFile($imgname, $imgname, array());
     return $this;
 }
Exemple #3
0
 /**
  * Save's the image resource in a target location.
  *
  * @since	1.0
  * @access	public
  * @param	string	The target where the image should be saved into.
  * @return	bool	True on success, false otherwise
  * @return
  */
 public function save($target)
 {
     // Set the image target.
     $this->image->target($target);
     // Try to save the image.
     $state = $this->image->save();
     // TODO: Add some logging if failed.
     if (!$state) {
     }
     return $state;
 }
Exemple #4
0
 /**
  * 保存图片
  * @param  string  $imgname   图片保存名称
  * @param  string  $type      图片类型
  * @param  integer $quality   图像质量
  * @param  boolean $interlace 是否对JPEG类型图片设置隔行扫描
  * @return Object             当前图片处理库对象
  */
 public function save($imgname, $type = null, $quality = 80, $interlace = true)
 {
     $this->img->save($imgname, $type, $quality, $interlace);
     return $this;
 }
Exemple #5
0
 /**
  * 保存操作,当包含_id时更新对应的_id所对应的文档,否则创建新的文档。
  *
  * @param array $datas            
  * @return array
  */
 public function save(&$datas)
 {
     try {
         $result = $this->result($this->_client->save(serialize($datas)));
         $datas = $result['datas'];
         return $result['rst'];
     } catch (SoapFault $e) {
         $this->soapFaultMsg($e);
         return false;
     }
 }
 /**
  * 保存图片
  * @param  string  $imgname   图片保存名称
  * @param  string  $type      图片类型
  * @param  integer $quality   图像质量
  * @param  boolean $interlace 是否对JPEG类型图片设置隔行扫描
  * @return Object             当前图片处理库对象
  */
 public static function save($imgname, $type = null, $quality = 80, $interlace = true)
 {
     self::$img->save($imgname, $type, $quality, $interlace);
 }
Exemple #7
0
 /**
  * 保存图片
  * @param  string  $imgname   图片保存名称
  * @param  string  $type      图片类型
  * @param  boolean $interlace 是否对JPEG类型图片设置隔行扫描
  * @return Object             当前图片处理库对象
  */
 public function save($imgname, $type = NULL, $interlace = true)
 {
     $this->img->save($imgname, $type, $interlace);
     return $this;
 }