addons/alioss/SDK/samplesObject.php

Functions

createObjectDir()

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

Create a 'virtual' folder

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

putObject()

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

Upload in-memory data to oss

Simple upload---upload specified in-memory data to an OSS object

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

uploadFile()

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

Uploads a local file to OSS

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

listObjects()

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.

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

listAllObjects()

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

Lists all folders and files under the bucket. Use nextMarker repeatedly to get all objects.

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

getObject()

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

Get the content of an object.

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

putSymlink()

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

Put symlink

Parameters

\OssClient $ossClient

The Instance of OssClient

string $bucket

bucket name

Returns

null —

getSymlink()

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

Get symlink

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

getObjectToLocalFile()

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

Get_object_to_local_file

Get object Download object to a specified file.

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

copyObject()

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

Copy object When the source object is same as the target one, copy operation will just update the metadata.

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

modifyMetaForObject()

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

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

getObjectMeta()

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

Get object meta, that is, getObjectMeta

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

deleteObject()

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

Delete an object

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

deleteObjects()

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

Delete multiple objects in batch

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —

doesObjectExist()

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

Check whether an object exists

Parameters

\OssClient $ossClient

OssClient instance

string $bucket

bucket name

Returns

null —