addons/alioss/SDK/samplesBucket.php

Functions

createBucket()

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)

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

Name of the bucket to create

Returns

null —

doesBucketExist()

doesBucketExist(\OssClient  $ossClient, string  $bucket) : mixed

Check whether a bucket exists.

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

mixed —

deleteBucket()

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

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

Name of the bucket to delete

Returns

null —

putBucketAcl()

putBucketAcl(\OssClient  $ossClient, string  $bucket) : null

Set bucket ACL

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

getBucketAcl()

getBucketAcl(\OssClient  $ossClient, string  $bucket) : null

Get bucket ACL

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

listBuckets()

listBuckets(\OssClient  $ossClient) : null

List all buckets

Parameters

\OssClient $ossClient

OssClient instance

Returns

null —