Zend Framework  1.12
Public Member Functions | Public Attributes | List of all members
Zend_Cloud_DocumentService_Adapter Interface Reference

Public Member Functions

 createCollection ($name, $options=null)
 Create collection.
 
 deleteCollection ($name, $options=null)
 Delete collection.
 
 listCollections ($options=null)
 List collections.
 
 listDocuments ($collectionName, array $options=null)
 List all documents in a collection.
 
 insertDocument ($collectionName, $document, $options=null)
 Insert document.
 
 replaceDocument ($collectionName, $document, $options=null)
 Replace document The new document replaces the existing document with the same ID.
 
 updateDocument ($collectionName, $documentID, $fieldset=null, $options=null)
 Update document The fields of the existing documents will be updated.
 
 deleteDocument ($collectionName, $documentID, $options=null)
 Delete document.
 
 fetchDocument ($collectionName, $documentID, $options=null)
 Fetch single document by ID.
 
 query ($collectionName, $query, $options=null)
 Query for documents stored in the document service.
 
 select ($fields=null)
 Create query statement.
 
 getClient ()
 Get the concrete service client.
 

Public Attributes

const HTTP_ADAPTER = 'http_adapter'
 

Member Function Documentation

createCollection (   $name,
  $options = null 
)

Create collection.

Parameters
string$name
array$options
Returns
array

Implemented in Zend_Cloud_DocumentService_Adapter_WindowsAzure, and Zend_Cloud_DocumentService_Adapter_SimpleDb.

deleteCollection (   $name,
  $options = null 
)

Delete collection.

Parameters
string$name
array$options
Returns
void

Implemented in Zend_Cloud_DocumentService_Adapter_WindowsAzure, and Zend_Cloud_DocumentService_Adapter_SimpleDb.

deleteDocument (   $collectionName,
  $documentID,
  $options = null 
)

Delete document.

Parameters
string$collectionNameCollection name
mixed$documentIDDocument ID, adapter-dependent
array$options
Returns
void

Implemented in Zend_Cloud_DocumentService_Adapter_WindowsAzure, and Zend_Cloud_DocumentService_Adapter_SimpleDb.

fetchDocument (   $collectionName,
  $documentID,
  $options = null 
)

Fetch single document by ID.

Will return false if the document does not exist

Parameters
string$collectionNameCollection name
mixed$documentIDDocument ID, adapter-dependent
array$options
Returns
Zend_Cloud_DocumentService_Document

Implemented in Zend_Cloud_DocumentService_Adapter_WindowsAzure, and Zend_Cloud_DocumentService_Adapter_SimpleDb.

getClient ( )
insertDocument (   $collectionName,
  $document,
  $options = null 
)

Insert document.

Parameters
string$collectionNameCollection name
Zend_Cloud_DocumentService_Document$documentDocument to insert
array$options
Returns
boolean

Implemented in Zend_Cloud_DocumentService_Adapter_WindowsAzure, and Zend_Cloud_DocumentService_Adapter_SimpleDb.

listCollections (   $options = null)

List collections.

Parameters
array$options
Returns
array List of collection names

Implemented in Zend_Cloud_DocumentService_Adapter_WindowsAzure, and Zend_Cloud_DocumentService_Adapter_SimpleDb.

listDocuments (   $collectionName,
array  $options = null 
)

List all documents in a collection.

Parameters
string$collectionName
null | array$options
Returns
Zend_Cloud_DocumentService_DocumentSet

Implemented in Zend_Cloud_DocumentService_Adapter_WindowsAzure, and Zend_Cloud_DocumentService_Adapter_SimpleDb.

query (   $collectionName,
  $query,
  $options = null 
)

Query for documents stored in the document service.

If a string is passed in $query, the query string will be passed directly to the service.

Parameters
string$collectionNameCollection name
string$query
array$options
Returns
array Array of field sets

Implemented in Zend_Cloud_DocumentService_Adapter_WindowsAzure, and Zend_Cloud_DocumentService_Adapter_SimpleDb.

replaceDocument (   $collectionName,
  $document,
  $options = null 
)

Replace document The new document replaces the existing document with the same ID.

Parameters
string$collectionNameCollection name
Zend_Cloud_DocumentService_Document$document
array$options

Implemented in Zend_Cloud_DocumentService_Adapter_WindowsAzure, and Zend_Cloud_DocumentService_Adapter_SimpleDb.

select (   $fields = null)
updateDocument (   $collectionName,
  $documentID,
  $fieldset = null,
  $options = null 
)

Update document The fields of the existing documents will be updated.

Fields not specified in the set will be left as-is.

Parameters
string$collectionName
mixed | Zend_Cloud_DocumentService_Document$documentIDDocument ID, adapter-dependent, or document containing updates
array | Zend_Cloud_DocumentService_Document$fieldsetSet of fields to update
array$options
Returns
boolean

Implemented in Zend_Cloud_DocumentService_Adapter_WindowsAzure, and Zend_Cloud_DocumentService_Adapter_SimpleDb.

Member Data Documentation

const HTTP_ADAPTER = 'http_adapter'