Cloud/DocumentService/Adapter/WindowsAzure.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-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Cloud
- Subpackage
- DocumentService
\Zend_Cloud_DocumentService_Adapter_WindowsAzure
Package: Zend_Cloud\DocumentServiceSimpleDB adapter for document service.
Provides functionality surrounding setting classes for each of:
- document objects
- document set objects
- query class objects
- Parent(s)
- \Zend_Cloud_DocumentService_Adapter_AbstractAdapter
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
Properties
string $_queryClass = 'Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query'
Class to utilize for new query objects
Default value'Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query'
Details- Type
- string
Methods
_getDocumentFromArray(array $document, null | string $collectionName = null) : \Zend_Cloud_DocumentService_Document
Create suitable document from array of fields
ParametersName | Type | Description |
---|
$document | array | |
---|
$collectionName | null | string | Collection to which this document belongs |
---|
Returns _validateDocumentId(array | string $documentId, null | string $collectionName = false) : array
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:
- if a default partition key is present, it creates an identifier using
that and the provided document ID
- if a collection name is provided, it will use that for the partition key
- otherwise, it's invalid
ParametersName | Type | Description |
---|
$documentId | array | string | |
---|
$collectionName | null | string | |
---|
ReturnsThrows_validateFieldKey(string $key) : void
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.
ParametersName | Type | Description |
---|
$key | string | |
---|
Throws_validateFields(\Zend_Cloud_DocumentService_Document | array $document) : void
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.
ParametersThrows_validateKey(string $key) : void
Validate a partition or row key
ParametersName | Type | Description |
---|
$key | string | |
---|
Throws fetchDocument(string $collectionName, mixed $documentId, array $options = null) : \Zend_Cloud_DocumentService_Document
Fetch single document by ID
ParametersName | Type | Description |
---|
$collectionName | string | Collection name |
---|
$documentId | mixed | Document ID, adapter-dependent |
---|
$options | array | |
---|
Returns getDefaultPartitionKey() : null | string
Retrieve default partition key
ReturnsType | Description |
---|
null | string | |
listDocuments(string $collectionName, null | array $options = null) : \Zend_Cloud_DocumentService_DocumentSet
List all documents in a collection
ParametersName | Type | Description |
---|
$collectionName | string | |
---|
$options | null | array | |
---|
Returns query(string $collectionName, string | \Zend_Cloud_DocumentService_Adapter_WindowsAzure_Query $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.
ParametersReturnsType | Description |
---|
array | Zend_Cloud_DocumentService_DocumentSet |