ADDON_PATH
ADDON_PATH = \ROOT_PATH . 'addons' . \DS
IAcsClient | |
IClientProfile | |
ISigner | |
SessionHandlerInterface | |
Stringable | |
Stringable |
createBucket(\OssClient $ossClient, string $bucket) : null
Create a new bucket acl indicates the access permission of a bucket, including: private, public-read-only/private-read-write, and public read-write.
Private indicates that only the bucket owner or authorized users can access the data.. The three permissions are separately defined by (OssClient::OSS_ACL_TYPE_PRIVATE,OssClient::OSS_ACL_TYPE_PUBLIC_READ, OssClient::OSS_ACL_TYPE_PUBLIC_READ_WRITE)
\OssClient | $ossClient | OssClient instance |
string | $bucket | Name of the bucket to create |
deleteBucket(\OssClient $ossClient, string $bucket) : null
Delete a bucket. If the bucket is not empty, the deletion fails.
A bucket which is not empty indicates that it does not contain any objects or parts that are not completely uploaded during multipart upload
\OssClient | $ossClient | OssClient instance |
string | $bucket | Name of the bucket to delete |
download(string $filename, string $name = '', bool $content = false, int $expire = 360, mixed $openinBrowser = false) : \think\response\Download
获取\think\response\Download对象实例
string | $filename | 要下载的文件 |
string | $name | 显示文件名 |
bool | $content | 是否为内容 |
int | $expire | 有效期(秒) |
mixed | $openinBrowser |
getSignedUrlForPuttingObject(\OssClient $ossClient, string $bucket) : null
Generate the signed url for PutObject to control write accesses under private privilege.
\OssClient | $ossClient | OssClient instance |
string | $bucket | bucket name |
getSignedUrlForPuttingObjectFromFile(\OssClient $ossClient, string $bucket) : mixed
Generate the signed url for PutObject's signed url. User could use the signed url to upload file directly.
\OssClient | $ossClient | OssClient instance |
string | $bucket | bucket name |
int_to_string(mixed $data, array $map = array('status' => array(1 => '正常', -1 => '删除', 0 => '禁用', 2 => '未审核', 3 => '草稿'))) : array
select返回的数组进行整数映射转换
mixed | $data | |
array | $map | 映射关系二维数组 array( '字段名1'=>array(映射关系数组), '字段名2'=>array(映射关系数组), ...... ) |
array( array('id'=>1,'title'=>'标题','status'=>'1','status_text'=>'正常') .... )
listObjects(\OssClient $ossClient, string $bucket) : null
Lists all files and folders in the bucket.
Note if there's more items than the max-keys specified, the caller needs to use the nextMarker returned as the value for the next call's maker paramter. Loop through all the items returned from ListObjects.
\OssClient | $ossClient | OssClient instance |
string | $bucket | bucket name |
modifyMetaForObject(\OssClient $ossClient, string $bucket) : null
Update Object Meta it leverages the feature of copyObject: when the source object is just the target object, the metadata could be updated via copy
\OssClient | $ossClient | OssClient instance |
string | $bucket | bucket name |
trigger_deprecation(string $package, string $version, string $message, mixed ...$args) : void
Triggers a silenced deprecation notice.
string | $package | The name of the Composer package that is triggering the deprecation |
string | $version | The version of the package that introduced the deprecation |
string | $message | The message of the deprecation |
mixed | $args variadic | Values to insert in the message using printf() formatting |