[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/zend/Zend/Service/Amazon/ -> S3.php (summary)

Zend Framework LICENSE

Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: http://framework.zend.com/license/new-bsd New BSD License
Version: $Id$
File Size: 900 lines (27 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Zend_Service_Amazon_S3:: (27 methods):
  setEndpoint()
  getEndpoint()
  __construct()
  _validBucketName()
  createBucket()
  isBucketAvailable()
  isObjectAvailable()
  removeBucket()
  getInfo()
  getBuckets()
  cleanBucket()
  getObjectsByBucket()
  _fixupObjectName()
  getObject()
  getObjectStream()
  putObject()
  putFile()
  putFileStream()
  removeObject()
  _makeRequest()
  addSignature()
  getMimeType()
  registerAsClient()
  unregisterAsClient()
  getWrapperClient()
  registerStreamWrapper()
  unregisterStreamWrapper()


Class: Zend_Service_Amazon_S3  - X-Ref

Amazon S3 PHP connection class

setEndpoint($endpoint)   X-Ref
Set S3 endpoint to use

param: string|Zend_Uri_Http $endpoint
return: Zend_Service_Amazon_S3

getEndpoint()   X-Ref
Get current S3 endpoint

return: Zend_Uri_Http

__construct($accessKey=null, $secretKey=null, $region=null)   X-Ref
Constructor

param: string $accessKey
param: string $secretKey
param: string $region

_validBucketName($bucket)   X-Ref
Verify if the bucket name is valid

param: string $bucket
return: boolean

createBucket($bucket, $location = null)   X-Ref
Add a new bucket

param: string $bucket
return: boolean

isBucketAvailable($bucket)   X-Ref
Checks if a given bucket name is available

param: string $bucket
return: boolean

isObjectAvailable($object)   X-Ref
Checks if a given object exists

param: string $object
return: boolean

removeBucket($bucket)   X-Ref
Remove a given bucket. All objects in the bucket must be removed prior
to removing the bucket.

param: string $bucket
return: boolean

getInfo($object)   X-Ref
Get metadata information for a given object

param: string $object
return: array|false

getBuckets()   X-Ref
List the S3 buckets

return: array|false

cleanBucket($bucket)   X-Ref
Remove all objects in the bucket.

param: string $bucket
return: boolean

getObjectsByBucket($bucket, $params = array()   X-Ref
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.

param: string $bucket
param: array $params S3 GET Bucket Paramater
return: array|false

_fixupObjectName($object)   X-Ref
Make sure the object name is valid

param: string $object
return: string

getObject($object, $paidobject=false)   X-Ref
Get an object

param: string $object
param: bool   $paidobject This is "requestor pays" object
return: string|false

getObjectStream($object, $streamfile = null, $paidobject=false)   X-Ref
Get an object using streaming

Can use either provided filename for storage or create a temp file if none provided.

param: string $object Object path
param: string $streamfile File to write the stream to
param: bool   $paidobject This is "requestor pays" object
return: Zend_Http_Response_Stream|false

putObject($object, $data, $meta=null)   X-Ref
Upload an object by a PHP string

param: string $object Object name
param: string|resource $data   Object data (can be string or stream)
param: array  $meta   Metadata
return: boolean

putFile($path, $object, $meta=null)   X-Ref
Put file to S3 as object

param: string $path   File name
param: string $object Object name
param: array  $meta   Metadata
return: boolean

putFileStream($path, $object, $meta=null)   X-Ref
Put file to S3 as object, using streaming

param: string $path   File name
param: string $object Object name
param: array  $meta   Metadata
return: boolean

removeObject($object)   X-Ref
Remove a given object

param: string $object
return: boolean

_makeRequest($method, $path='', $params=null, $headers=array()   X-Ref
Make a request to Amazon S3

param: string $method    Request method
param: string $path        Path to requested object
param: array  $params    Request parameters
param: array  $headers    HTTP headers
param: string|resource $data        Request data
return: Zend_Http_Response

addSignature($method, $path, &$headers)   X-Ref
Add the S3 Authorization signature to the request headers

param: string $method
param: string $path
param: array &$headers
return: string

getMimeType($path)   X-Ref
Attempt to get the content-type of a file based on the extension

param: string $path
return: string

registerAsClient($name)   X-Ref
Register this object as stream wrapper client

param: string $name
return: Zend_Service_Amazon_S3

unregisterAsClient($name)   X-Ref
Unregister this object as stream wrapper client

param: string $name
return: Zend_Service_Amazon_S3

getWrapperClient($name)   X-Ref
Get wrapper client for stream type

param: string $name
return: Zend_Service_Amazon_S3

registerStreamWrapper($name='s3')   X-Ref
Register this object as stream wrapper

param: string $name
return: Zend_Service_Amazon_S3

unregisterStreamWrapper($name='s3')   X-Ref
Unregister this object as stream wrapper

param: string $name
return: Zend_Service_Amazon_S3



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1