OSS/Models/OSSObject.php

Show: PublicProtectedPrivateinherited
Table of Contents
Copyright (C) Alibaba Cloud Computing All rights reserved.

版权所有 (C)阿里云计算有限公司

\Aliyun\OSS\Models\OSSObject

Package: Aliyun\OSS\Models
表示OSS中的Object。

在 OSS 中,用户的每个文件都是一个 Object,每个文件需小于 5G。 Object包含key、data和user meta。其中,key是Object 的名字; data是Object 的数据;user meta是用户对该object的描述。

Object 命名规范

  • 使用UTF-8编码
  • 长度必须在 1-1023字节之间
  • 不能以斜线(/)或反斜线(\)开关

Properties

>VPropertyprivatestring $bucketName

Object所在Bucket的名字

Details
Type
string
>VPropertyprivatestring $key

Object的key

Details
Type
string
>VPropertyprivatearray $metadata = array()

metadata

Default valuearray()Details
Type
array
>VPropertyprivateresource $objectContent = null

Object的内容

Default valuenullDetails
Type
resource
>VPropertyprivatearray $userMetadata = array()

用户设置的元数据

Default valuearray()Details
Type
array

Methods

methodpublic__destruct() : void

对象析构时会自动关闭流

methodpublic__toString() : string

以string输出Object的内容

Returns
TypeDescription
string
methodpublicgetBucketName() : string

获取Object所在Bucket的名称

Returns
TypeDescription
string
methodpublicgetCacheControl() : string

获取返回的Cache-Control

Returns
TypeDescription
string
methodpublicgetContentDisposition() : string

获取返回的Content-Disposition

Returns
TypeDescription
string
methodpublicgetContentEncoding() : string

获取返回的Content-Encoding

Returns
TypeDescription
string
methodpublicgetContentLanguage() : string

获取返回的Content-Language

Returns
TypeDescription
string
methodpublicgetContentLength() : int

获取返回内容的长度

Returns
TypeDescription
int
methodpublicgetContentType() : string

获取返回的Content-Type

Returns
TypeDescription
string
methodpublicgetETag() : string

获取ETag

Returns
TypeDescription
string
methodpublicgetExpires() : \DateTime | null

获取Expires

Returns
TypeDescription
\DateTime | null
methodpublicgetKey() : string

获取Object的Key

Returns
TypeDescription
string
methodpublicgetLastModified() : \DateTime

获取最后修改的日期

Returns
TypeDescription
\DateTime
methodpublicgetMetadata() : array

获取Object的元数据

Returns
TypeDescription
array
methodpublicgetObjectContent() : resource

获取Object的内容

Returns
TypeDescription
resource
methodpublicgetUserMetadata() : array

获取用户自定义元数据

Returns
TypeDescription
array
Documentation was generated by phpDocumentor 2.0.0a12.