\Common

Class Common

示例程序【Samples/*.php】 的Common类,用于获取OssClient实例和其他公用方法

Summary

Methods
Properties
Constants
getOssClient()
getBucketName()
createBucket()
println()
No public properties found
endpoint
accessKeyId
accessKeySecret
bucket
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

endpoint

endpoint = \Config::OSS_ENDPOINT

accessKeyId

accessKeyId = \Config::OSS_ACCESS_ID

accessKeySecret

accessKeySecret = \Config::OSS_ACCESS_KEY

bucket

bucket = \Config::OSS_TEST_BUCKET

Methods

getOssClient()

getOssClient() : \OSS\OssClient

根据Config配置,得到一个OssClient实例

Returns

\OSS\OssClient

一个OssClient实例

getBucketName()

getBucketName() 

createBucket()

createBucket() 

工具方法,创建一个存储空间,如果发生异常直接exit

println()

println(  $message) 

Parameters

$message