Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Amazon S3 PHP connection class
S3_ENDPOINT = 's3.amazonaws.com'
Details S3_ACL_PRIVATE = 'private'
Details S3_ACL_PUBLIC_READ = 'public-read'
Details S3_ACL_PUBLIC_WRITE = 'public-read-write'
Details S3_ACL_AUTH_READ = 'authenticated-read'
Details S3_REQUESTPAY_HEADER = 'x-amz-request-payer'
Details S3_ACL_HEADER = 'x-amz-acl'
Details S3_CONTENT_TYPE_HEADER = 'Content-Type'
DetailsZend_Uri_Http $_endpoint = 'S3_ENDPOINT'Endpoint for the service
Detailsarray $_wrapperClients = 'array'Store for stream wrapper clients
Details__construct(
string $accessKey
=
null, string $secretKey
=
null, string $region
=
null
)
:
Constructor
Details_fixupObjectName(
string $object
)
:
stringMake sure the object name is valid
Details_makeRequest(
string $method, string $path, array $params
=
null, array $headers
=
array, string|resource $data
=
null
)
:
Zend_Http_ResponseMake a request to Amazon S3
Details_validBucketName(
string $bucket
)
:
booleanVerify if the bucket name is valid
DetailsaddSignature(
string $method, string $path, array $headers
)
:
stringAdd the S3 Authorization signature to the request headers
DetailscleanBucket(
string $bucket
)
:
booleanRemove all objects in the bucket.
DetailscreateBucket(
string $bucket, $location
=
null
)
:
booleanAdd a new bucket
DetailsgetBuckets(
)
:
array|falseList the S3 buckets
DetailsgetEndpoint(
)
:
Zend_Uri_HttpGet current S3 endpoint
DetailsgetInfo(
string $object
)
:
array|falseGet metadata information for a given object
DetailsgetMimeType(
string $path
)
:
stringAttempt to get the content-type of a file based on the extension
DetailsgetObject(
string $object, bool $paidobject
=
false
)
:
string|falseGet an object
DetailsgetObjectStream(
string $object, string $streamfile
=
null, bool $paidobject
=
false
)
:
Zend_Http_Response_Stream|falseGet an object using streaming
Can use either provided filename for storage or create a temp file if none provided.
DetailsgetObjectsByBucket(
string $bucket, array $params
=
array
)
:
array|falseList the objects in a bucket.
Provides the list of object keys that are contained in the bucket. Valid params include the following. prefix - Limits the response to keys which begin with the indicated prefix. You can use prefixes to separate a bucket into different sets of keys in a way similar to how a file system uses folders. marker - Indicates where in the bucket to begin listing. The list will only include keys that occur lexicographically after marker. This is convenient for pagination: To get the next page of results use the last key of the current page as the marker. max-keys - The maximum number of keys you'd like to see in the response body. The server might return fewer than this many keys, but will not return more. delimiter - Causes keys that contain the same string between the prefix and the first occurrence of the delimiter to be rolled up into a single result element in the CommonPrefixes collection. These rolled-up keys are not returned elsewhere in the response.
DetailsgetWrapperClient(
string $name
)
:
Zend_Service_Amazon_S3Get wrapper client for stream type
DetailsisBucketAvailable(
string $bucket
)
:
booleanChecks if a given bucket name is available
DetailsisObjectAvailable(
string $object
)
:
booleanChecks if a given object exists
DetailsputFile(
string $path, string $object, array $meta
=
null
)
:
booleanPut file to S3 as object
DetailsputFileStream(
string $path, string $object, array $meta
=
null
)
:
booleanPut file to S3 as object, using streaming
DetailsputObject(
string $object, string|resource $data, array $meta
=
null
)
:
booleanUpload an object by a PHP string
DetailsregisterAsClient(
string $name
)
:
Zend_Service_Amazon_S3Register this object as stream wrapper client
DetailsregisterStreamWrapper(
string $name
=
s3
)
:
Zend_Service_Amazon_S3Register this object as stream wrapper
DetailsremoveBucket(
string $bucket
)
:
booleanRemove a given bucket. All objects in the bucket must be removed prior to removing the bucket.
DetailsremoveObject(
string $object
)
:
booleanRemove a given object
DetailssetEndpoint(
string|Zend_Uri_Http $endpoint
)
:
Zend_Service_Amazon_S3Set S3 endpoint to use
DetailsunregisterAsClient(
string $name
)
:
Zend_Service_Amazon_S3Unregister this object as stream wrapper client
DetailsunregisterStreamWrapper(
string $name
=
s3
)
:
Zend_Service_Amazon_S3Unregister this object as stream wrapper
Details