Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Zend_Cloud_StorageService_Adapter_S3 Class Reference

Public Member Functions

 __construct ($options=array())
 Constructor.
 
 fetchItem ($path, $options=array())
 Get an item from the storage service.
 
 storeItem ($destinationPath, $data, $options=array())
 Store an item in the storage service.
 
 deleteItem ($path, $options=array())
 Delete an item in the storage service.
 
 copyItem ($sourcePath, $destinationPath, $options=array())
 Copy an item in the storage service to a given path.
 
 moveItem ($sourcePath, $destinationPath, $options=array())
 Move an item in the storage service to a given path.
 
 renameItem ($path, $name, $options=null)
 Rename an item in the storage service to a given name.
 
 listItems ($path, $options=null)
 List items in the given directory in the storage service.
 
 fetchMetadata ($path, $options=array())
 Get a key/value array of metadata for the given path.
 
 storeMetadata ($destinationPath, $metadata, $options=array())
 Store a key/value array of metadata at the given path.
 
 deleteMetadata ($path)
 Delete a key/value array of metadata at the given path.
 
 getClient ()
 Get the concrete client.
 

Public Attributes

const BUCKET_NAME = 'bucket_name'
 
const BUCKET_AS_DOMAIN = 'bucket_as_domain?'
 
const FETCH_STREAM = 'fetch_stream'
 
const METADATA = 'metadata'
 
const AWS_ACCESS_KEY = 'aws_accesskey'
 AWS constants.
 
const AWS_SECRET_KEY = 'aws_secretkey'
 
- Public Attributes inherited from Zend_Cloud_StorageService_Adapter
const HTTP_ADAPTER = 'http_adapter'
 

Protected Member Functions

 _getFullPath ($path, $options)
 Get full path, including bucket, for an object.
 

Protected Attributes

 $_s3
 
 $_defaultBucketName = null
 
 $_defaultBucketAsDomain = false
 

Constructor & Destructor Documentation

__construct (   $options = array())

Constructor.

Parameters
array | Zend_Config$options
Returns
void

Member Function Documentation

_getFullPath (   $path,
  $options 
)
protected

Get full path, including bucket, for an object.

Parameters
string$path
array$options
Returns
void
copyItem (   $sourcePath,
  $destinationPath,
  $options = array() 
)

Copy an item in the storage service to a given path.

WARNING: This operation is *very* expensive for services that do not support copying an item natively.

Support streams for those services that don't support natively

Parameters
string$sourcePath
string$destinationpath
array$options
Returns
void

Implements Zend_Cloud_StorageService_Adapter.

deleteItem (   $path,
  $options = array() 
)

Delete an item in the storage service.

Parameters
string$path
array$options
Returns
void

Implements Zend_Cloud_StorageService_Adapter.

deleteMetadata (   $path)

Delete a key/value array of metadata at the given path.

Parameters
string$path
array$options
Returns
void

Implements Zend_Cloud_StorageService_Adapter.

fetchItem (   $path,
  $options = array() 
)

Get an item from the storage service.

Support streams

Parameters
string$path
array$options
Returns
string

Implements Zend_Cloud_StorageService_Adapter.

fetchMetadata (   $path,
  $options = array() 
)

Get a key/value array of metadata for the given path.

Parameters
string$path
array$options
Returns
array

Implements Zend_Cloud_StorageService_Adapter.

getClient ( )

Get the concrete client.

Returns
Zend_Service_Amazon_S3

Implements Zend_Cloud_StorageService_Adapter.

listItems (   $path,
  $options = null 
)

List items in the given directory in the storage service.

The $path must be a directory

Parameters
string$pathMust be a directory
array$options
Returns
array A list of item names

Implements Zend_Cloud_StorageService_Adapter.

moveItem (   $sourcePath,
  $destinationPath,
  $options = array() 
)

Move an item in the storage service to a given path.

Support streams for those services that don't support natively

Parameters
string$sourcePath
string$destinationpath
array$options
Returns
void

Implements Zend_Cloud_StorageService_Adapter.

renameItem (   $path,
  $name,
  $options = null 
)

Rename an item in the storage service to a given name.

Parameters
string$path
string$name
array$options
Returns
void

Implements Zend_Cloud_StorageService_Adapter.

storeItem (   $destinationPath,
  $data,
  $options = array() 
)

Store an item in the storage service.

WARNING: This operation overwrites any item that is located at $destinationPath.

Support streams

Parameters
string$destinationPath
string | resource$data
array$options
Returns
void

Implements Zend_Cloud_StorageService_Adapter.

storeMetadata (   $destinationPath,
  $metadata,
  $options = array() 
)

Store a key/value array of metadata at the given path.

WARNING: This operation overwrites any metadata that is located at $destinationPath.

Parameters
string$destinationPath
array$options
Returns
void

Implements Zend_Cloud_StorageService_Adapter.

Member Data Documentation

$_defaultBucketAsDomain = false
protected
$_defaultBucketName = null
protected
$_s3
protected
const AWS_ACCESS_KEY = 'aws_accesskey'

AWS constants.

const AWS_SECRET_KEY = 'aws_secretkey'
const BUCKET_AS_DOMAIN = 'bucket_as_domain?'
const BUCKET_NAME = 'bucket_name'
const FETCH_STREAM = 'fetch_stream'
const METADATA = 'metadata'