Свойство | Тип | Описание | |
---|---|---|---|
$OSS_ACL_TYPES | OSS ACL数组 |
Свойство | Тип | Описание | |
---|---|---|---|
$use_ssl | 是否使用SSL |
Метод | Описание | |
---|---|---|
__construct ( $access_id = null, string $access_key = null, string $hostname = null ) | 默认构造函数 | |
auth ( array $options ) | Authorization | |
copy_object ( $from_bucket, string $from_object, $to_bucket, string $to_object, string $options = null ) : ResponseCore | 拷贝Object | |
create_bucket ( string $bucket, string $acl = self::OSS_ACL_TYPE_PRIVATE, array $options = null ) : ResponseCore | Create Bucket | |
create_object_dir ( string $bucket, string $object, array $options = null ) : ResponseCore | 创建目录(目录和文件的区别在于,目录最后增加'/') | |
create_object_group ( string $bucket, string $object_group, array $object_arry, array $options = null ) : ResponseCore | 创建Object Group | |
delete_bucket ( string $bucket, array $options = null ) : ResponseCore | Delete Bucket | |
delete_object ( $bucket, string $object, array $options = null ) : ResponseCore | 删除object | |
delete_object_group ( $bucket, string $object_group, array $options = null ) : ResponseCore | 删除Object Group | |
delete_objects ( $bucket, array $objects, array $options = null ) : ResponseCore | 批量删除objects | |
get_bucket_acl ( string $bucket, array $options = null ) : ResponseCore | Get Bucket's ACL | |
get_max_retries ( ) : integer | 获取最大尝试次数 | |
get_object ( $bucket, string $object, array $options = null ) : ResponseCore | 获得Object内容 | |
get_object_group ( string $bucket, string $object_group, array $options = null ) : ResponseCore | 获取Object Group | |
get_object_group_index ( string $bucket, string $object_group, array $options = null ) : ResponseCore | 获取Object Group 的Object List信息 | |
get_object_group_meta ( string $bucket, string $object_group, string $options = null ) : ResponseCore | 获得object group的meta信息 | |
get_object_meta ( string $bucket, string $object, string $options = null ) : ResponseCore | 获得object的meta信息 | |
get_sign_url ( string $bucket, string $object, integer $timeout = 60, array $options = null ) : string | 获取带签名的url | |
is_gb2312 ( string $str ) : boolean | 检测是否GB2312编码 | |
is_object_exist ( $bucket, string $object, array $options = null ) : boolean | 检测Object是否存在 | |
list_bucket ( array $options = null ) : ResponseCore | Get Buket list | |
list_object ( string $bucket, array $options = null ) : ResponseCore | List Object | |
set_bucket_acl ( string $bucket, string $acl, array $options = null ) : ResponseCore | Set bucket'ACL | |
set_debug_mode ( boolean $debug_mode = true ) : void | 设置debug模式 | |
set_enable_domain_style ( boolean $enable_domain_style = true ) : void | 设置路径形式,如果为true,则启用三级域名,如bucket.oss.aliyuncs.com | |
set_host_name ( string $hostname, integer $port = null ) : void | 设置host地址 | |
set_max_retries ( integer $max_retries = 3 ) : void | 设置最大尝试次数 | |
set_vhost ( string $vhost ) : void | 设置vhost地址 | |
to_query_string ( $options = [] ) : string | 生成query params | |
upload_file_by_content ( string $bucket, string $object, array $options = null ) : ResponseCore | 通过在http body中添加内容来上传文件,适合比较小的文件 根据api约定,需要在http header中增加content-length字段 | |
upload_file_by_file ( string $bucket, string $object, string $file, array $options = null ) : ResponseCore | 上传文件,适合比较大的文件 |
Метод | Описание | |
---|---|---|
check_char ( string $str, boolean $gbk = true ) : boolean | 检测是否GBK编码 | |
chk_chinese ( $str ) : boolean | 检测是否含有中文 | |
hex_to_base64 ( string $str ) : string | 转化十六进制的数据为base64 | |
is_empty ( string $name, string $errMsg ) : void | 校验BUCKET/OBJECT/OBJECT GROUP是否为空 | |
log ( string $msg ) : void | 记录日志 | |
make_object_group_xml ( string $bucket, array $object_array ) : string | 转化object数组为固定个xml格式 | |
read_dir ( string $dir, $exclude = ".|..|.svn", boolean $recursive = false ) : array | 读取目录 | |
s_replace ( $subject ) | ||
set_options_header ( string $key, string $value, array &$options ) : void | 设置http header | |
validate_bucket ( string $bucket ) : boolean | 检验bucket名称是否合法 bucket的命名规范: 1. 只能包括小写字母,数字 2. 必须以小写字母或者数字开头 3. 长度必须在3-63字节之间 | |
validate_content ( array $options ) : string | 检测上传文件的内容 | |
validate_content_length ( array $options ) : void | 验证文件长度 | |
validate_object ( string $object ) : boolean | 检验object名称是否合法 object命名规范: 1. 规则长度必须在1-1023字节之间 2. 使用UTF-8编码 | |
validate_options ( array $options ) : boolean | 检验$options |
public __construct ( $access_id = null, string $access_key = null, string $hostname = null ) | ||
$access_key | string | (Optional) |
$hostname | string | (Optional) |
public create_object_group ( string $bucket, string $object_group, array $object_arry, array $options = null ) : ResponseCore | ||
$bucket | string | (Required) Bucket名称 |
$object_group | string | (Required) Object Group名称 |
$object_arry | array | (Required) object数组,所有的object必须在同一个bucket下 其中$object 数组的格式如下: $object = array( $object1, $object2, ... ) |
$options | array | (Optional) |
Результат | ResponseCore |
public delete_bucket ( string $bucket, array $options = null ) : ResponseCore | ||
$bucket | string | (Required) |
$options | array | (Optional) |
Результат | ResponseCore |
public delete_object ( $bucket, string $object, array $options = null ) : ResponseCore | ||
$object | string | (Required) |
$options | array | (Optional) |
Результат | ResponseCore |
public delete_object_group ( $bucket, string $object_group, array $options = null ) : ResponseCore | ||
$object_group | string | (Required) |
$options | array | (Optional) |
Результат | ResponseCore |
public delete_objects ( $bucket, array $objects, array $options = null ) : ResponseCore | ||
$objects | array | (Required) |
$options | array | (Optional) |
Результат | ResponseCore |
public get_bucket_acl ( string $bucket, array $options = null ) : ResponseCore | ||
$bucket | string | (Required) |
$options | array | (Optional) |
Результат | ResponseCore |
public get_object ( $bucket, string $object, array $options = null ) : ResponseCore | ||
$object | string | (Required) |
$options | array | (Optional) |
Результат | ResponseCore |
public list_bucket ( array $options = null ) : ResponseCore | ||
$options | array | (Optional) |
Результат | ResponseCore |
public list_object ( string $bucket, array $options = null ) : ResponseCore | ||
$bucket | string | (Required) |
$options | array | (Optional) 其中options中的参数如下 $options = array( 'max-keys' => max-keys用于限定此次返回object的最大数,如果不设定,默认为100,max-keys取值不能大于100。 'prefix' => 限定返回的object key必须以prefix作为前缀。注意使用prefix查询时,返回的key中仍会包含prefix。 'delimiter' => 是一个用于对Object名字进行分组的字符。所有名字包含指定的前缀且第一次出现delimiter字符之间的object作为一组元素 'marker' => 用户设定结果从marker之后按字母排序的第一个开始返回。 ) 其中 prefix,marker用来实现分页显示效果,参数的长度必须小于256字节。 |
Результат | ResponseCore |
public set_debug_mode ( boolean $debug_mode = true ) : void | ||
$debug_mode | boolean | (Optional) |
Результат | void |
public set_enable_domain_style ( boolean $enable_domain_style = true ) : void | ||
$enable_domain_style | boolean | |
Результат | void |
public set_max_retries ( integer $max_retries = 3 ) : void | ||
$max_retries | integer | |
Результат | void |
public to_query_string ( $options = [] ) : string | ||
Результат | string | 返回诸如 key1=value1&key2=value2 |