Zend Framework
1.12
|
Public Member Functions | |
__construct ($options=array()) | |
Constructor. | |
createCollection ($name, $options=null) | |
Create collection. | |
deleteCollection ($name, $options=null) | |
Delete collection. | |
listCollections ($options=null) | |
List collections. | |
listDocuments ($collectionName, array $options=null) | |
List documents. | |
insertDocument ($collectionName, $document, $options=null) | |
Insert document. | |
replaceDocument ($collectionName, $document, $options=null) | |
Replace an existing document with a new version. | |
updateDocument ($collectionName, $documentId, $fieldset=null, $options=null) | |
Update document. | |
deleteDocument ($collectionName, $document, $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. | |
![]() | |
setDocumentClass ($class) | |
Set the class for document objects. | |
getDocumentClass () | |
Get the class for document objects. | |
setDocumentSetClass ($class) | |
Set the class for document set objects. | |
getDocumentSetClass () | |
Get the class for document set objects. | |
setQueryClass ($class) | |
Set the query class for query objects. | |
getQueryClass () | |
Get the class for query objects. | |
Public Attributes | |
const | AWS_ACCESS_KEY = 'aws_accesskey' |
const | AWS_SECRET_KEY = 'aws_secretkey' |
const | ITEM_NAME = 'ItemName' |
const | MERGE_OPTION = "merge" |
const | RETURN_DOCUMENTS = "return_documents" |
const | DEFAULT_QUERY_CLASS = 'Zend_Cloud_DocumentService_Adapter_SimpleDb_Query' |
![]() | |
const | DOCUMENT_CLASS = 'document_class' |
const | DOCUMENTSET_CLASS = 'documentset_class' |
const | QUERY_CLASS = 'query_class' |
![]() | |
const | HTTP_ADAPTER = 'http_adapter' |
Protected Member Functions | |
_makeAttributes ($name, $attributes) | |
Convert array of key-value pairs to array of Amazon attributes. | |
_resolveAttributes ($attributes, $returnDocument=false) | |
Convert array of Amazon attributes to array of key-value pairs. | |
_getDocumentFromArray ($document) | |
Create suitable document from array of fields. | |
_getDocumentSetFromResultSet (Zend_Service_Amazon_SimpleDb_Page $resultSet, $returnDocs=true) | |
Create a DocumentSet from a SimpleDb resultset. | |
Protected Attributes | |
$_simpleDb | |
$_queryClass = 'Zend_Cloud_DocumentService_Adapter_SimpleDb_Query' | |
![]() | |
$_documentClass = 'Zend_Cloud_DocumentService_Document' | |
$_documentSetClass = 'Zend_Cloud_DocumentService_DocumentSet' | |
$_queryClass = 'Zend_Cloud_DocumentService_Query' | |
__construct | ( | $options = array() | ) |
|
protected |
Create suitable document from array of fields.
array | $document |
|
protected |
Create a DocumentSet from a SimpleDb resultset.
Zend_Service_Amazon_SimpleDb_Page | $resultSet | |
bool | $returnDocs |
|
protected |
Convert array of key-value pairs to array of Amazon attributes.
string | $name | |
array | $attributes |
|
protected |
Convert array of Amazon attributes to array of key-value pairs.
array | $attributes |
createCollection | ( | $name, | |
$options = null |
|||
) |
Create collection.
string | $name | |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
deleteCollection | ( | $name, | |
$options = null |
|||
) |
Delete collection.
string | $name | |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
deleteDocument | ( | $collectionName, | |
$document, | |||
$options = null |
|||
) |
Delete document.
string | $collectionName | Collection from which to delete document |
mixed | $document | Document ID or Document object. |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
fetchDocument | ( | $collectionName, | |
$documentId, | |||
$options = null |
|||
) |
Fetch single document by ID.
string | $collectionName | Collection name |
mixed | $documentId | Document ID, adapter-dependent |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
getClient | ( | ) |
Get the concrete service client.
Implements Zend_Cloud_DocumentService_Adapter.
insertDocument | ( | $collectionName, | |
$document, | |||
$options = null |
|||
) |
Insert document.
string | $collectionName | Collection into which to insert document |
array | Zend_Cloud_DocumentService_Document | $document | |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
listCollections | ( | $options = null | ) |
List collections.
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
listDocuments | ( | $collectionName, | |
array | $options = null |
||
) |
List documents.
Returns a key/value array of document names to document objects.
string | $collectionName | Name of collection for which to list documents |
array | null | $options |
Implements Zend_Cloud_DocumentService_Adapter.
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.
string | $collectionName | Collection name |
string | $query | |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
replaceDocument | ( | $collectionName, | |
$document, | |||
$options = null |
|||
) |
Replace an existing document with a new version.
string | $collectionName | |
array | Zend_Cloud_DocumentService_Document | $document | |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
select | ( | $fields = null | ) |
updateDocument | ( | $collectionName, | |
$documentId, | |||
$fieldset = null , |
|||
$options = null |
|||
) |
Update document.
The new document replaces the existing document.
Option 'merge' specifies to add all attributes (if true) or specific attributes ("attr" => true) instead of replacing them. By default, attributes are replaced.
string | $collectionName | |
mixed | Zend_Cloud_DocumentService_Document | $documentId | Document ID, adapter-dependent |
array | Zend_Cloud_DocumentService_Document | $fieldset | Set of fields to update |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
|
protected |
|
protected |
const AWS_ACCESS_KEY = 'aws_accesskey' |
const AWS_SECRET_KEY = 'aws_secretkey' |
const DEFAULT_QUERY_CLASS = 'Zend_Cloud_DocumentService_Adapter_SimpleDb_Query' |
const ITEM_NAME = 'ItemName' |
const MERGE_OPTION = "merge" |
const RETURN_DOCUMENTS = "return_documents" |