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 license@zend.com so we can send you a copy immediately.
Abstract document service adapter
Provides functionality surrounding setting classes for each of: - document objects - document set objects - query class objects

string
$_documentClass= 'Zend_Cloud_DocumentService_Document'
Class to utilize for new document objects
Zend_Cloud_DocumentService_Document
Details
string
$_documentSetClass= 'Zend_Cloud_DocumentService_DocumentSet'
Class to utilize for new document set objects
Zend_Cloud_DocumentService_DocumentSet
Details
createCollection(
string $name, array $options
=
null
)
:
array
Create collection.
Inherited from: \Zend_Cloud_DocumentService_Adapter::createCollection()Name | Type | Description |
---|---|---|
$name | string | |
$options | array |
Type | Description |
---|---|
array |

deleteCollection(
string $name, array $options
=
null
)
:
void
Delete collection.
Inherited from: \Zend_Cloud_DocumentService_Adapter::deleteCollection()Name | Type | Description |
---|---|---|
$name | string | |
$options | array |

deleteDocument(
string $collectionName, mixed $documentID, array $options
=
null
)
:
void
Delete document
Inherited from: \Zend_Cloud_DocumentService_Adapter::deleteDocument()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_Document
Fetch 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(
)
:
void
Get the concrete service client
Inherited from: \Zend_Cloud_DocumentService_Adapter::getClient()
getDocumentSetClass(
)
:
string
Get the class for document set objects
Type | Description |
---|---|
string |

insertDocument(
string $collectionName, \Zend_Cloud_DocumentService_Document $document, array $options
=
null
)
:
boolean
Insert document
Inherited from: \Zend_Cloud_DocumentService_Adapter::insertDocument()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
List collections.
Inherited from: \Zend_Cloud_DocumentService_Adapter::listCollections()Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
array | List of collection names |

listDocuments(
string $collectionName, null|array $options
=
null
)
:
\Zend_Cloud_DocumentService_DocumentSet
List 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
)
:
array
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.
Inherited from: \Zend_Cloud_DocumentService_Adapter::query()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
)
:
void
Replace 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
Create query statement
Inherited from: \Zend_Cloud_DocumentService_Adapter::select()Name | Type | Description |
---|---|---|
$fields | string |
Type | Description |
---|---|
\Zend_Cloud_DocumentService_Query |

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

setDocumentSetClass(
string $class
)
:
\Zend_Cloud_DocumentService_Adapter_AbstractAdapter
Set 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_AbstractAdapter
Set 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
)
:
boolean
Update 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 |