Zend Framework
1.12
|
Public Member Functions | |
__construct ($options=array()) | |
Constructor. | |
setDefaultPartitionKey ($key) | |
Set the default partition key. | |
getDefaultPartitionKey () | |
Retrieve default partition key. | |
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. | |
updateDocument ($collectionName, $documentId, $fieldset=null, $options=null) | |
Update document. | |
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. | |
_validateFields ($document) | |
Validate a document's fields for well-formedness. | |
_validateFieldKey ($key) | |
Validate an individual field name for well-formedness. | |
![]() | |
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 | ACCOUNT_NAME = 'storage_accountname' |
const | ACCOUNT_KEY = 'storage_accountkey' |
const | HOST = "storage_host" |
const | PROXY_HOST = "storage_proxy_host" |
const | PROXY_PORT = "storage_proxy_port" |
const | PROXY_CREDENTIALS = "storage_proxy_credentials" |
const | DEFAULT_PARTITION_KEY = "default_partition_key" |
const | PARTITION_KEY = 'PartitionKey' |
const | ROW_KEY = 'RowKey' |
const | VERIFY_ETAG = "verify_etag" |
const | TIMESTAMP_KEY = "Timestamp" |
const | DEFAULT_HOST = Zend_Service_WindowsAzure_Storage::URL_CLOUD_TABLE |
const | DEFAULT_QUERY_CLASS = 'Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query' |
![]() | |
const | DOCUMENT_CLASS = 'document_class' |
const | DOCUMENTSET_CLASS = 'documentset_class' |
const | QUERY_CLASS = 'query_class' |
![]() | |
const | HTTP_ADAPTER = 'http_adapter' |
Protected Member Functions | |
_getDocumentFromArray ($document, $collectionName=null) | |
Create suitable document from array of fields. | |
_resolveAttributes (Zend_Service_WindowsAzure_Storage_TableEntity $entity) | |
Resolve table values to attributes. | |
_validateKey ($key) | |
Validate a partition or row key. | |
_validateCompositeKey (array $key) | |
Validate a composite key. | |
_validateDocumentId ($documentId, $collectionName=false) | |
Validate a document identifier. | |
Protected Attributes | |
$_storageClient | |
$_queryClass = 'Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query' | |
$_defaultPartitionKey | |
![]() | |
$_documentClass = 'Zend_Cloud_DocumentService_Document' | |
$_documentSetClass = 'Zend_Cloud_DocumentService_DocumentSet' | |
$_queryClass = 'Zend_Cloud_DocumentService_Query' | |
__construct | ( | $options = array() | ) |
Constructor.
array | $options |
|
protected |
Create suitable document from array of fields.
array | $document | |
null | string | $collectionName | Collection to which this document belongs |
|
protected |
Resolve table values to attributes.
Zend_Service_WindowsAzure_Storage_TableEntity | $entity |
|
protected |
|
protected |
Validate a document identifier.
If the identifier is an array containing a valid partition and row key, returns it. If the identifier is a string:
array | string | $documentId | |
null | string | $collectionName |
Zend_Cloud_DocumentService_Exception |
_validateFieldKey | ( | $key | ) |
Validate an individual field name for well-formedness.
Since Azure uses Atom, and fieldnames are included as part of XML element tag names, the field names must be valid XML names.
While we could potentially normalize names, this could also lead to conflict with other field names – which we should avoid. As such, invalid field names will raise an exception.
string | $key |
Zend_Cloud_DocumentService_Exception |
_validateFields | ( | $document | ) |
Validate a document's fields for well-formedness.
Since Azure uses Atom, and fieldnames are included as part of XML element tag names, the field names must be valid XML names.
Zend_Cloud_DocumentService_Document | array | $document |
Zend_Cloud_DocumentService_Exception |
|
protected |
Validate a partition or row key.
string | $key |
Zend_Cloud_DocumentService_Exception |
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, | |
$documentId, | |||
$options = null |
|||
) |
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.
getDefaultPartitionKey | ( | ) |
Retrieve default partition key.
insertDocument | ( | $collectionName, | |
$document, | |||
$options = null |
|||
) |
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 all documents in a collection.
string | $collectionName | |
null | array | $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 | Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query | $query | |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
replaceDocument | ( | $collectionName, | |
$document, | |||
$options = null |
|||
) |
Replace document.
The new document replaces the existing document.
Zend_Cloud_DocumentService_Document | $document | |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
select | ( | $fields = null | ) |
Create query statement.
Implements Zend_Cloud_DocumentService_Adapter.
setDefaultPartitionKey | ( | $key | ) |
Set the default partition key.
string | $key |
updateDocument | ( | $collectionName, | |
$documentId, | |||
$fieldset = null , |
|||
$options = null |
|||
) |
Update document.
The new document is merged the existing document.
string | $collectionName | |
mixed | Zend_Cloud_DocumentService_Document | $documentId | Document identifier or document contaiing updates |
null|array|Zend_Cloud_DocumentService_Document | Fields to update (or new fields)) | |
array | $options |
Implements Zend_Cloud_DocumentService_Adapter.
|
protected |
|
protected |
|
protected |
const ACCOUNT_KEY = 'storage_accountkey' |
const ACCOUNT_NAME = 'storage_accountname' |
const DEFAULT_HOST = Zend_Service_WindowsAzure_Storage::URL_CLOUD_TABLE |
const DEFAULT_PARTITION_KEY = "default_partition_key" |
const DEFAULT_QUERY_CLASS = 'Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query' |
const HOST = "storage_host" |
const PARTITION_KEY = 'PartitionKey' |
const PROXY_CREDENTIALS = "storage_proxy_credentials" |
const PROXY_HOST = "storage_proxy_host" |
const PROXY_PORT = "storage_proxy_port" |
const ROW_KEY = 'RowKey' |
const TIMESTAMP_KEY = "Timestamp" |
const VERIFY_ETAG = "verify_etag" |