Public Member Functions |
| | setEndpoint ($endpoint) |
| | getEndpoint () |
| | __construct ($accessKey=null, $secretKey=null, $region=null) |
| | _validBucketName ($bucket) |
| | createBucket ($bucket, $location=null) |
| | isBucketAvailable ($bucket) |
| | isObjectAvailable ($object) |
| | removeBucket ($bucket) |
| | getInfo ($object) |
| | getBuckets () |
| | cleanBucket ($bucket) |
| | getObjectsByBucket ($bucket, $params=array()) |
| | getObject ($object, $paidobject=false) |
| | getObjectStream ($object, $streamfile=null, $paidobject=false) |
| | putObject ($object, $data, $meta=null) |
| | putFile ($path, $object, $meta=null) |
| | putFileStream ($path, $object, $meta=null) |
| | removeObject ($object) |
| | _makeRequest ($method, $path='', $params=null, $headers=array(), $data=null) |
| | registerAsClient ($name) |
| | unregisterAsClient ($name) |
| | registerStreamWrapper ($name='s3') |
| | unregisterStreamWrapper ($name='s3') |
Static Public Member Functions |
| static | getMimeType ($path) |
| static | getWrapperClient ($name) |
Data Fields |
| const | S3_ENDPOINT = 's3.amazonaws.com' |
| const | S3_ACL_PRIVATE = 'private' |
| const | S3_ACL_PUBLIC_READ = 'public-read' |
| const | S3_ACL_PUBLIC_WRITE = 'public-read-write' |
| const | S3_ACL_AUTH_READ = 'authenticated-read' |
| const | S3_REQUESTPAY_HEADER = 'x-amz-request-payer' |
| const | S3_ACL_HEADER = 'x-amz-acl' |
| const | S3_CONTENT_TYPE_HEADER = 'Content-Type' |
Protected Member Functions |
| | _fixupObjectName ($object) |
| | addSignature ($method, $path, &$headers) |
Protected Attributes |
| | $_endpoint |
Static Protected Attributes |
| static | $_wrapperClients = array() |
Detailed Description
Definition at line 43 of file S3.php.
Constructor & Destructor Documentation
| __construct |
( |
$ |
accessKey = null, |
|
|
$ |
secretKey = null, |
|
|
$ |
region = null |
|
) |
| |
Constructor
- Parameters:
-
| string | $accessKey | |
| string | $secretKey | |
| string | $region | |
Definition at line 109 of file S3.php.
Member Function Documentation
Make sure the object name is valid
- Parameters:
-
- Returns:
- string
Definition at line 322 of file S3.php.
| _makeRequest |
( |
$ |
method, |
|
|
$ |
path = '', |
|
|
$ |
params = null, |
|
|
$ |
headers = array(), |
|
|
$ |
data = null |
|
) |
| |
Add the S3 Authorization signature to the request headers
- Parameters:
-
| string | $method | |
| string | $path | |
| array | &$headers | |
- Returns:
- string
Definition at line 610 of file S3.php.
Remove all objects in the bucket.
- Parameters:
-
- Returns:
- boolean
Definition at line 268 of file S3.php.
Add a new bucket
- Parameters:
-
- Returns:
- boolean
Definition at line 157 of file S3.php.
List the S3 buckets
- Returns:
- array|false
Definition at line 244 of file S3.php.
Get metadata information for a given object
- Parameters:
-
- Returns:
- array|false
Definition at line 219 of file S3.php.
Attempt to get the content-type of a file based on the extension
- Parameters:
-
- Returns:
- string
Definition at line 681 of file S3.php.
Get an object
- Parameters:
-
| string | $object | |
| bool | $paidobject | This is "requestor pays" object |
- Returns:
- string|false
Definition at line 343 of file S3.php.
List 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.
- Parameters:
-
| string | $bucket | |
| array | $params | S3 GET Bucket Paramater |
- Returns:
- array|false
Definition at line 294 of file S3.php.
Get an object using streaming
Can use either provided filename for storage or create a temp file if none provided.
- Parameters:
-
| string | $object | Object path |
| string | $streamfile | File to write the stream to |
| bool | $paidobject | This is "requestor pays" object |
- Returns:
- Zend_Http_Response_Stream|false
Definition at line 370 of file S3.php.
Checks if a given bucket name is available
- Parameters:
-
- Returns:
- boolean
Definition at line 178 of file S3.php.
Checks if a given object exists
- Parameters:
-
- Returns:
- boolean
Definition at line 191 of file S3.php.
| putFile |
( |
$ |
path, |
|
|
$ |
object, |
|
|
$ |
meta = null |
|
) |
| |
Put file to S3 as object, using streaming
- Parameters:
-
| string | $path | File name |
| string | $object | Object name |
| array | $meta | Metadata |
- Returns:
- boolean
- See also:
- Zend_Service_Amazon_S3_Exception
Definition at line 464 of file S3.php.
| putObject |
( |
$ |
object, |
|
|
$ |
data, |
|
|
$ |
meta = null |
|
) |
| |
Upload an object by a PHP string
- Parameters:
-
| string | $object | Object name |
| string | resource | $data | Object data (can be string or stream) |
| array | $meta | Metadata |
- Returns:
- boolean
Definition at line 397 of file S3.php.
Remove a given bucket. All objects in the bucket must be removed prior to removing the bucket.
- Parameters:
-
- Returns:
- boolean
Definition at line 205 of file S3.php.
Remove a given object
- Parameters:
-
- Returns:
- boolean
Definition at line 496 of file S3.php.
Field Documentation
$_wrapperClients = array() [static, protected] |
The documentation for this class was generated from the following file:
- C:/xampp/htdocs/moodle/lib/zend/Zend/Service/Amazon/S3.php