@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | * @param string $srcPath 本地文件路径 |
| 48 | 48 | * @param string $dstPath 上传的文件路径 |
| 49 | 49 | * @param string $bizAttr 文件属性 |
| 50 | - * @param string $slicesize 分片大小(512k,1m,2m,3m),默认:1m |
|
| 50 | + * @param string $sliceSize 分片大小(512k,1m,2m,3m),默认:1m |
|
| 51 | 51 | * @param string $insertOnly 同名文件是否覆盖 |
| 52 | 52 | * |
| 53 | 53 | * @return [type] [description] |
@@ -127,6 +127,10 @@ discard block |
||
| 127 | 127 | * @param int $order 默认正序(=0), 填1为反序, |
| 128 | 128 | * @param string $offset 透传字段,用于翻页,前端不需理解,需要往前/往后翻页则透传回来 |
| 129 | 129 | */ |
| 130 | + |
|
| 131 | + /** |
|
| 132 | + * @param string $folder |
|
| 133 | + */ |
|
| 130 | 134 | public static function listFolder( |
| 131 | 135 | $bucket, $folder, $num = 20, |
| 132 | 136 | $pattern = 'eListBoth', $order = 0, |
@@ -212,6 +216,10 @@ discard block |
||
| 212 | 216 | * 'Content-Language' => '*' |
| 213 | 217 | * 'x-cos-meta-自定义内容' => '*' |
| 214 | 218 | */ |
| 219 | + |
|
| 220 | + /** |
|
| 221 | + * @param string $authority |
|
| 222 | + */ |
|
| 215 | 223 | public static function update($bucket, $path, |
| 216 | 224 | $bizAttr = null, $authority = null, $customer_headers_array = null) |
| 217 | 225 | { |
@@ -308,8 +316,8 @@ discard block |
||
| 308 | 316 | * 内部方法,上传文件. |
| 309 | 317 | * |
| 310 | 318 | * @param string $bucket bucket名称 |
| 311 | - * @param string $srcPath 本地文件路径 |
|
| 312 | - * @param string $dstPath 上传的文件路径 |
|
| 319 | + * @param string $srcFpath 本地文件路径 |
|
| 320 | + * @param string $dstFpath 上传的文件路径 |
|
| 313 | 321 | * @param string $bizAttr 文件属性 |
| 314 | 322 | * @param string $sliceSize 分片大小 |
| 315 | 323 | * @param int $insertOnly 是否覆盖同名文件:0 覆盖,1:不覆盖 |
@@ -625,6 +633,7 @@ discard block |
||
| 625 | 633 | |
| 626 | 634 | /** |
| 627 | 635 | * Get slice size. |
| 636 | + * @param string|null $sliceSize |
|
| 628 | 637 | */ |
| 629 | 638 | private static function getSliceSize($sliceSize) |
| 630 | 639 | { |
@@ -674,8 +683,8 @@ discard block |
||
| 674 | 683 | /** |
| 675 | 684 | * 判断pattern值是否正确. |
| 676 | 685 | * |
| 677 | - * @param string $authority |
|
| 678 | 686 | * |
| 687 | + * @param string $pattern |
|
| 679 | 688 | * @return [type] bool |
| 680 | 689 | */ |
| 681 | 690 | private static function isPatternValid($pattern) |
@@ -729,6 +738,10 @@ discard block |
||
| 729 | 738 | |
| 730 | 739 | // Check |$path| is a valid file path. |
| 731 | 740 | // Return true on success, otherwise return false. |
| 741 | + |
|
| 742 | + /** |
|
| 743 | + * @param string $path |
|
| 744 | + */ |
|
| 732 | 745 | private static function isValidPath($path) |
| 733 | 746 | { |
| 734 | 747 | if (strpos($path, '?') !== false) { |
@@ -763,8 +776,8 @@ discard block |
||
| 763 | 776 | * Copy a file. |
| 764 | 777 | * |
| 765 | 778 | * @param $bucket bucket name. |
| 766 | - * @param $srcFpath source file path. |
|
| 767 | - * @param $dstFpath destination file path. |
|
| 779 | + * @param string $srcFpath source file path. |
|
| 780 | + * @param string $dstFpath destination file path. |
|
| 768 | 781 | * @param $overwrite if the destination location is occupied, overwrite it or not? |
| 769 | 782 | * |
| 770 | 783 | * @return array|mixed. |
@@ -795,8 +808,8 @@ discard block |
||
| 795 | 808 | * Move a file. |
| 796 | 809 | * |
| 797 | 810 | * @param $bucket bucket name. |
| 798 | - * @param $srcFpath source file path. |
|
| 799 | - * @param $dstFpath destination file path. |
|
| 811 | + * @param string $srcFpath source file path. |
|
| 812 | + * @param string $dstFpath destination file path. |
|
| 800 | 813 | * @param $overwrite if the destination location is occupied, overwrite it or not? |
| 801 | 814 | * |
| 802 | 815 | * @return array|mixed. |
@@ -213,7 +213,7 @@ |
||
| 213 | 213 | * 'x-cos-meta-自定义内容' => '*' |
| 214 | 214 | */ |
| 215 | 215 | public static function update($bucket, $path, |
| 216 | - $bizAttr = null, $authority = null, $customer_headers_array = null) |
|
| 216 | + $bizAttr = null, $authority = null, $customer_headers_array = null) |
|
| 217 | 217 | { |
| 218 | 218 | $path = self::normalizerPath($path); |
| 219 | 219 | |
@@ -30,9 +30,9 @@ |
||
| 30 | 30 | }); |
| 31 | 31 | |
| 32 | 32 | Storage::disk('cosv4') |
| 33 | - ->addPlugin(new PutRemoteFile()) |
|
| 34 | - ->addPlugin(new PutRemoteFileAs()) |
|
| 35 | - ->addPlugin(new GetUrl()); |
|
| 33 | + ->addPlugin(new PutRemoteFile()) |
|
| 34 | + ->addPlugin(new PutRemoteFileAs()) |
|
| 35 | + ->addPlugin(new GetUrl()); |
|
| 36 | 36 | } |
| 37 | 37 | |
| 38 | 38 | /** |
@@ -48,7 +48,7 @@ discard block |
||
| 48 | 48 | } |
| 49 | 49 | |
| 50 | 50 | /** |
| 51 | - * @param $path |
|
| 51 | + * @param string $path |
|
| 52 | 52 | * |
| 53 | 53 | * @return string |
| 54 | 54 | */ |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | } |
| 386 | 386 | |
| 387 | 387 | /** |
| 388 | - * @param $content |
|
| 388 | + * @param string $content |
|
| 389 | 389 | * |
| 390 | 390 | * @return bool|string |
| 391 | 391 | */ |
@@ -401,7 +401,7 @@ discard block |
||
| 401 | 401 | } |
| 402 | 402 | |
| 403 | 403 | /** |
| 404 | - * @param $tmpfname |
|
| 404 | + * @param boolean|string $tmpfname |
|
| 405 | 405 | */ |
| 406 | 406 | private function deleteTempFile($tmpfname) |
| 407 | 407 | { |
@@ -409,8 +409,8 @@ discard block |
||
| 409 | 409 | } |
| 410 | 410 | |
| 411 | 411 | /** |
| 412 | - * @param $path |
|
| 413 | - * @param $content |
|
| 412 | + * @param string $path |
|
| 413 | + * @param string $content |
|
| 414 | 414 | * |
| 415 | 415 | * @return bool |
| 416 | 416 | */ |