Skip to content

Commit 997155c

Browse files
committed
Line exceeds 120 characters
1 parent efb8c4a commit 997155c

File tree

1 file changed

+62
-42
lines changed

1 file changed

+62
-42
lines changed

src/Qiniu/Storage/BucketManager.php

Lines changed: 62 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,12 @@ public function buckets($shared = true)
5454
* share 参数用于指定共享空间。
5555
*/
5656

57-
public function listbuckets($region = null, $global = 'false', $line = 'false', $shared = 'false')
58-
{
57+
public function listbuckets(
58+
$region = null,
59+
$global = 'false',
60+
$line = 'false',
61+
$shared = 'false'
62+
) {
5963
$path = '/v3/buckets?region=' . $region . '&global=' . $global . '&line=' . $line . '&shared=' . $share;
6064
$info = $this->ucPost($path);
6165
return $info;
@@ -115,9 +119,9 @@ public function bucketInfo($bucket)
115119
* 在Region 未指定且Global 不为 true 时(包含未指定的情况,下同),返回用户的所有空间。
116120
* 在指定了 region 参数且 global 不为 true 时,只列举非全局空间。
117121
* 在指定了global为 true 时,返回所有全局空间,忽略region 参数
118-
* shared 不指定shared参数或指定shared为rw或false时,返回包含具有读写权限空间,指定shared为rd或true时,返回包含具有读权限空间。
122+
* shared 不指定shared参数或指定shared为rw或false时,返回包含具有读写权限空间,
123+
* 指定shared为rd或true时,返回包含具有读权限空间。
119124
* fs:如果为 true,会返回每个空间当前的文件数和存储量(实时数据)。
120-
*
121125
* @return string[] 包含空间信息
122126
*/
123127
public function bucketInfos($region = null, $global = 'false', $shared = 'false', $fs = 'false')
@@ -142,18 +146,23 @@ public function bucketInfos($region = null, $global = 'false', $shared = 'false'
142146
* @param $delimiter 指定目录分隔符
143147
*
144148
* @return array 包含文件信息的数组,类似:[
145-
* {
146-
* "hash" => "<Hash string>",
147-
* "key" => "<Key string>",
148-
* "fsize" => "<file size>",
149-
* "putTime" => "<file modify time>"
150-
* },
151-
* ...
152-
* ]
149+
* {
150+
* "hash" => "<Hash string>",
151+
* "key" => "<Key string>",
152+
* "fsize" => "<file size>",
153+
* "putTime" => "<file modify time>"
154+
* },
155+
* ...
156+
* ]
153157
* @link http://developer.qiniu.com/docs/v6/api/reference/rs/list.html
154158
*/
155-
public function listFiles($bucket, $prefix = null, $marker = null, $limit = 1000, $delimiter = null)
156-
{
159+
public function listFiles(
160+
$bucket,
161+
$prefix = null,
162+
$marker = null,
163+
$limit = 1000,
164+
$delimiter = null
165+
) {
157166
$query = array('bucket' => $bucket);
158167
\Qiniu\setWithoutEmpty($query, 'prefix', $prefix);
159168
\Qiniu\setWithoutEmpty($query, 'marker', $marker);
@@ -167,12 +176,12 @@ public function listFiles($bucket, $prefix = null, $marker = null, $limit = 1000
167176
* 设置Referer防盗链
168177
*
169178
* @param $bucket 空间名
170-
* @param $mode 0: 表示关闭Referer(使用此选项将会忽略以下参数并将恢复默认值); 1: 表示设置Referer白名单; 2:
171-
* 表示设置Referer黑名单
179+
* @param $mode 0: 表示关闭Referer(使用此选项将会忽略以下参数并将恢复默认值);
180+
* 1: 表示设置Referer白名单; 2:表示设置Referer黑名单
172181
* @param $norefer 0: 表示不允许空 Refer 访问; 1: 表示允许空 Refer 访问
173-
* @param $pattern 规则字符串, 当前允许格式分为三种: 一种为空主机头域名, 比如 foo.com; 一种是泛域名,
174-
* 比如 *.bar.com; 一种是完全通配符,
175-
* 即一个 *; 多个规则之间用;隔开, 比如: foo.com;*.bar.com;sub.foo.com;*.sub.bar.com
182+
* @param $pattern 规则字符串, 当前允许格式分为三种: 一种为空主机头域名,
183+
* 比如 foo.com; 一种是泛域名,比如 *.bar.com; 一种是完全通配符,
184+
* 即一个 *; 多个规则之间用;隔开, 比如: foo.com;*.bar.com;sub.foo.com;*.sub.bar.com
176185
* @param $source_enabled 源站是否支持,默认为0只给CDN配置, 设置为1表示开启源站防盗链
177186
*
178187
* @return mixed 成功返回NULL,失败返回对象Qiniu\Http\Error
@@ -185,16 +194,22 @@ public function listFiles($bucket, $prefix = null, $marker = null, $limit = 1000
185194
* 增加bucket生命规则
186195
*
187196
* @param $bucket 空间名
188-
* @param $name 规则名称 bucket 内唯一,长度小于50,不能为空,只能为字母、数字、下划线
197+
* @param $name 规则名称 bucket 内唯一,长度小于50,不能为空,只能为
198+
* 字母、数字、下划线
189199
* @param $prefix 同一个 bucket 里面前缀不能重复
190-
* @param $delete_after_days 指定上传文件多少天后删除,指定为0表示不删除,大于0表示多少天后删除,
191-
* 需大于 to_line_after_days
192-
* @param $to_line_after_days 指定文件上传多少天后转低频存储。指定为0表示不转低频存储,
193-
* 小于0表示上传的文件立即变低频存储
200+
* @param $delete_after_days 指定上传文件多少天后删除,指定为0表示不删除,
201+
* 大于0表示多少天后删除,需大于 to_line_after_days
202+
* @param $to_line_after_days 指定文件上传多少天后转低频存储。指定为0表示
203+
* 不转低频存储,小于0表示上传的文件立即变低频存储
194204
* @return mixed 成功返回NULL,失败返回对象Qiniu\Http\Error
195205
*/
196-
public function bucketLifecycleRule($bucket, $name, $prefix, $delete_after_days, $to_line_after_days)
197-
{
206+
public function bucketLifecycleRule(
207+
$bucket,
208+
$name,
209+
$prefix,
210+
$delete_after_days,
211+
$to_line_after_days
212+
) {
198213
$path = '/rules/add';
199214
if ($bucket) {
200215
$params['bucket'] = $bucket;
@@ -220,12 +235,13 @@ public function bucketLifecycleRule($bucket, $name, $prefix, $delete_after_days,
220235
* 更新bucket生命规则
221236
*
222237
* @param $bucket 空间名
223-
* @param $name 规则名称 bucket 内唯一,长度小于50,不能为空,只能为字母、数字、下划线
238+
* @param $name 规则名称 bucket 内唯一,长度小于50,不能为空,只能为字母、
239+
* 数字、下划线
224240
* @param $prefix 同一个 bucket 里面前缀不能重复
225-
* @param $delete_after_days 指定上传文件多少天后删除,指定为0表示不删除,大于0表示多少天后删除,
226-
* 需大于 to_line_after_days
227-
* @param $to_line_after_days 指定文件上传多少天后转低频存储。指定为0表示不转低频存储,
228-
* 小于0表示上传的文件立即变低频存储
241+
* @param $delete_after_days 指定上传文件多少天后删除,指定为0表示不删除,
242+
* 大于0表示多少天后删除,需大于 to_line_after_days
243+
* @param $to_line_after_days 指定文件上传多少天后转低频存储。指定为0表示不
244+
* 转低频存储,小于0表示上传的文件立即变低频存储
229245
* @return mixed 成功返回NULL,失败返回对象Qiniu\Http\Error
230246
*/
231247
public function updateBucketLifecycleRule(
@@ -473,14 +489,17 @@ public function getCorsRules($bucket)
473489

474490
/**
475491
* 设置回源规则
476-
* 使用该API设置源站优先级高于/image设置的源站,即IO优先读取source接口设置的源站配置,如果存在会忽略/image设置的源站
492+
* 使用该API设置源站优先级高于/image设置的源站,即IO优先读取source接口设置的源站配置,
493+
* 如果存在会忽略/image设置的源站
477494
* Bucket 空间名
478495
* Host(可选)回源Host
479496
* RetryCodes(可选),镜像回源时源站返回Code可以重试,最多指定3个,当前只支持4xx错误码重试
480-
* SourceQiniuAK,SourceQiniuSK(可选)如果存在将在回源时对URL进行签名,客户源站可以验证以保证请求来自Qiniu服务器
497+
* SourceQiniuAK,SourceQiniuSK(可选)如果存在将在回源时对URL进行签名,客户源站可以验证
498+
* 以保证请求来自Qiniu服务器
481499
* Expires(可选) 签名过期时间,如果不设置默认为1小时
482500
* Addr 回源地址,不可重复。
483-
* Weight 权重,范围限制1-100,不填默认为1,回源时会根据所有源的权重值进行源站选择,主备源会分开计算.
501+
* Weight 权重,范围限制1-100,不填默认为1,回源时会根据所有源的权重值进行源站选择,
502+
* 主备源会分开计算.
484503
* Backup 是否备用回源,回源优先尝试主源
485504
*/
486505
public function putBucktSourceConfig($params)
@@ -527,7 +546,8 @@ public function putBucketMaxAge($bucket, $maxAge)
527546
/**
528547
* 设置配额
529548
* <bucket>: 空间名称,不支持授权空间
530-
* <size>: 空间存储量配额,参数传入0或不传表示不更改当前配置,传入-1表示取消限额,新创建的空间默认没有限额。
549+
* <size>: 空间存储量配额,参数传入0或不传表示不更改当前配置,传入-1表示取消限额,
550+
* 新创建的空间默认没有限额。
531551
* <count>: 空间文件数配额,参数含义同<size>
532552
*/
533553
public function putBucketQuota($bucket, $size, $count)
@@ -555,13 +575,13 @@ public function getBucketQuota($bucket)
555575
* @param $key 待获取资源的文件名
556576
*
557577
* @return array 包含文件信息的数组,类似:
558-
* [
559-
* "hash" => "<Hash string>",
560-
* "key" => "<Key string>",
561-
* "fsize" => <file size>,
562-
* "putTime" => "<file modify time>"
563-
* "fileType" => <file type>
564-
* ]
578+
* [
579+
* "hash" => "<Hash string>",
580+
* "key" => "<Key string>",
581+
* "fsize" => <file size>,
582+
* "putTime" => "<file modify time>"
583+
* "fileType" => <file type>
584+
* ]
565585
*
566586
* @link http://developer.qiniu.com/docs/v6/api/reference/rs/stat.html
567587
*/

0 commit comments

Comments
 (0)