Skip to content

Commit

Permalink
added rest parameters to QiniuStorage@persistentFop
Browse files Browse the repository at this point in the history
a final chance to modify $notify_url, see QiniuAdapter@persistentFop
  • Loading branch information
django-wong committed May 11, 2017
1 parent 70a8021 commit 84f273f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/QiniuAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -565,11 +565,11 @@ public function privateDownloadUrl($path, $settings = 'default')
* @param bool $force
* @return bool
*/
public function persistentFop($path = null, $fops = null, $pipline = null, $force = false)
public function persistentFop($path = null, $fops = null, $pipline = null, $force = false, $notify_url = null)
{
$auth = $this->getAuth();

$pfop = New PersistentFop($auth, $this->bucket, $pipline, $this->notify_url, $force);
$pfop = New PersistentFop($auth, $this->bucket, $pipline, is_null($notify_url) ? $this->notify_url : $notify_url, $force);

list($id, $error) = $pfop->execute($path, $fops);

Expand Down
10 changes: 8 additions & 2 deletions src/QiniuStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,9 @@ public function deleteDirectory($key)
/**
* 获取上传Token
* @param $key
* @param $expires
* @param $policy
* @param $strictPolicy
* @return bool
*/
public function uploadToken($key = null, $expires = 3600, $policy = null, $strictPolicy = true)
Expand Down Expand Up @@ -236,11 +239,14 @@ public function privateImagePreviewUrl($key, $opts)
* 执行持久化数据处理
* @param $key
* @param $opts
* @param $pipline
* @param $force
* @param $notify_url
* @return mixed
*/
public function persistentFop($key, $opts)
public function persistentFop($key, $opts, $pipline = null, $force = false, $notify_url = null)
{
return $this->storage->getDriver()->persistentFop($key, $opts);
return $this->storage->getDriver()->persistentFop($key, $opts, $pipline, $force, $notify_url);
}

/**
Expand Down

0 comments on commit 84f273f

Please sign in to comment.