Cloud/DocumentService/Adapter/AbstractAdapter.php
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 [email protected] so we can send you a copy immediately.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Cloud
- Subpackage
- DocumentService
\Zend_Cloud_DocumentService_Adapter_AbstractAdapter
Abstract document service adapter
Provides functionality surrounding setting classes for each of: - document objects - document set objects - query class objects
- Implements
- \Zend_Cloud_DocumentService_Adapter
- Children
- \Zend_Cloud_DocumentService_Adapter_SimpleDb
- \Zend_Cloud_DocumentService_Adapter_WindowsAzure
- Category
- Zend
- Copyright
- Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
HTTP_ADAPTER
= 'http_adapter'- Inherited_from
- \Zend_Cloud_DocumentService_Adapter::HTTP_ADAPTER
Properties

string $_documentClass = 'Zend_Cloud_DocumentService_Document'Class to utilize for new document objects
'Zend_Cloud_DocumentService_Document'Details- Type
- string

string $_documentSetClass = 'Zend_Cloud_DocumentService_DocumentSet'Class to utilize for new document set objects
'Zend_Cloud_DocumentService_DocumentSet'Details- Type
- string
Methods

createCollection(string $name, array $options = null) : array
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $options | array |
| Type | Description |
|---|---|
| array |

deleteCollection(string $name, array $options = null) : void
| Name | Type | Description |
|---|---|---|
| $name | string | |
| $options | array |

deleteDocument(string $collectionName, mixed $documentID, array $options = null) : void
| Name | Type | Description |
|---|---|---|
| $collectionName | string | Collection name |
| $documentID | mixed | Document ID, adapter-dependent |
| $options | array |

fetchDocument(string $collectionName, mixed $documentID, array $options = null) : \Zend_Cloud_DocumentService_DocumentFetch single document by ID
Inherited from: \Zend_Cloud_DocumentService_Adapter::fetchDocument()Will return false if the document does not exist
| Name | Type | Description |
|---|---|---|
| $collectionName | string | Collection name |
| $documentID | mixed | Document ID, adapter-dependent |
| $options | array |
| Type | Description |
|---|---|
| \Zend_Cloud_DocumentService_Document |

getClient() : voidGet the concrete service client
Inherited from: \Zend_Cloud_DocumentService_Adapter::getClient()
getDocumentSetClass() : stringGet the class for document set objects
| Type | Description |
|---|---|
| string |

insertDocument(string $collectionName, \Zend_Cloud_DocumentService_Document $document, array $options = null) : boolean
| Name | Type | Description |
|---|---|---|
| $collectionName | string | Collection name |
| $document | \Zend_Cloud_DocumentService_Document | Document to insert |
| $options | array |
| Type | Description |
|---|---|
| boolean |

listCollections(array $options = null) : array
| Name | Type | Description |
|---|---|---|
| $options | array |
| Type | Description |
|---|---|
| array | List of collection names |

listDocuments(string $collectionName, null | array $options = null) : \Zend_Cloud_DocumentService_DocumentSetList all documents in a collection
Inherited from: \Zend_Cloud_DocumentService_Adapter::listDocuments()| Name | Type | Description |
|---|---|---|
| $collectionName | string | |
| $options | null | array |
| Type | Description |
|---|---|
| \Zend_Cloud_DocumentService_DocumentSet |

query(string $collectionName, string $query, array $options = null) : arrayQuery for documents stored in the document service.
Inherited from: \Zend_Cloud_DocumentService_Adapter::query()If a string is passed in $query, the query string will be passed directly to the service.
| Name | Type | Description |
|---|---|---|
| $collectionName | string | Collection name |
| $query | string | |
| $options | array |
| Type | Description |
|---|---|
| array | Array of field sets |

replaceDocument(string $collectionName, \Zend_Cloud_DocumentService_Document $document, array $options = null) : voidReplace document The new document replaces the existing document with the same ID.
Inherited from: \Zend_Cloud_DocumentService_Adapter::replaceDocument()| Name | Type | Description |
|---|---|---|
| $collectionName | string | Collection name |
| $document | \Zend_Cloud_DocumentService_Document | |
| $options | array |

select(string $fields = null) : \Zend_Cloud_DocumentService_Query
| Name | Type | Description |
|---|---|---|
| $fields | string |
| Type | Description |
|---|---|
| \Zend_Cloud_DocumentService_Query |

setDocumentClass(string $class) : \Zend_Cloud_DocumentService_Adapter_AbstractAdapterSet the class for document objects
| Name | Type | Description |
|---|---|---|
| $class | string |
| Type | Description |
|---|---|
| \Zend_Cloud_DocumentService_Adapter_AbstractAdapter |

setDocumentSetClass(string $class) : \Zend_Cloud_DocumentService_Adapter_AbstractAdapterSet the class for document set objects
| Name | Type | Description |
|---|---|---|
| $class | string |
| Type | Description |
|---|---|
| \Zend_Cloud_DocumentService_Adapter_AbstractAdapter |

setQueryClass(string $class) : \Zend_Cloud_DocumentService_Adapter_AbstractAdapterSet the query class for query objects
| Name | Type | Description |
|---|---|---|
| $class | string |
| Type | Description |
|---|---|
| \Zend_Cloud_DocumentService_Adapter_AbstractAdapter |

updateDocument(string $collectionName, mixed | \Zend_Cloud_DocumentService_Document $documentID, array | \Zend_Cloud_DocumentService_Document $fieldset = null, array $options = null) : booleanUpdate document The fields of the existing documents will be updated.
Inherited from: \Zend_Cloud_DocumentService_Adapter::updateDocument()Fields not specified in the set will be left as-is.
| Name | Type | Description |
|---|---|---|
| $collectionName | string | |
| $documentID | mixed | \Zend_Cloud_DocumentService_Document | Document ID, adapter-dependent, or document containing updates |
| $fieldset | array | \Zend_Cloud_DocumentService_Document | Set of fields to update |
| $options | array |
| Type | Description |
|---|---|
| boolean |