API Documentation

Zend/Cloud/DocumentService/Adapter.php

Show: inherited
    Table of Contents

    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.

    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

    Package: Zend\Cloud\DocumentService

    Common interface for document storage services in the cloud. This interface supports most document services and provides some flexibility for vendor-specific features and requirements via an optional $options array in each method signature. Classes implementing this interface should implement URI construction for collections and documents from the parameters given in each method and the account data passed in to the constructor. Classes implementing this interface are also responsible for security; access control isn't currently supported in this interface, although we are considering access control support in future versions of the interface.

    Category
    Zend  
    Copyright
    Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
    License
    New BSD License  

    Constants

    Constant  HTTP_ADAPTER = 'http_adapter'

    Methods

    methodpubliccreateCollection( string $name, array $options = null ) : array

    Create collection.

    Parameters
    Name Type Description
    $name string
    $options array
    Returns
    Type Description
    array
    methodpublicdeleteCollection( string $name, array $options = null ) : void

    Delete collection.

    Parameters
    Name Type Description
    $name string
    $options array
    methodpublicdeleteDocument( string $collectionName, mixed $documentID, array $options = null ) : void

    Delete document

    Parameters
    Name Type Description
    $collectionName string

    Collection name

    $documentID mixed

    Document ID, adapter-dependent

    $options array
    methodpublicfetchDocument( string $collectionName, mixed $documentID, array $options = null ) : \Zend_Cloud_DocumentService_Document

    Fetch single document by ID

    Will return false if the document does not exist

    Parameters
    Name Type Description
    $collectionName string

    Collection name

    $documentID mixed

    Document ID, adapter-dependent

    $options array
    Returns
    Type Description
    \Zend_Cloud_DocumentService_Document
    methodpublicgetClient( ) : void

    Get the concrete service client

    methodpublicinsertDocument( string $collectionName, \Zend_Cloud_DocumentService_Document $document, array $options = null ) : boolean

    Insert document

    Parameters
    Name Type Description
    $collectionName string

    Collection name

    $document \Zend_Cloud_DocumentService_Document

    Document to insert

    $options array
    Returns
    Type Description
    boolean
    methodpubliclistCollections( array $options = null ) : array

    List collections.

    Parameters
    Name Type Description
    $options array
    Returns
    Type Description
    array List of collection names
    methodpubliclistDocuments( string $collectionName, null|array $options = null ) : \Zend_Cloud_DocumentService_DocumentSet

    List all documents in a collection

    Parameters
    Name Type Description
    $collectionName string
    $options null|array
    Returns
    Type Description
    \Zend_Cloud_DocumentService_DocumentSet
    methodpublicquery( 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.

    Parameters
    Name Type Description
    $collectionName string

    Collection name

    $query string
    $options array
    Returns
    Type Description
    array Array of field sets
    methodpublicreplaceDocument( string $collectionName, \Zend_Cloud_DocumentService_Document $document, array $options = null ) : void

    Replace document The new document replaces the existing document with the same ID.

    Parameters
    Name Type Description
    $collectionName string

    Collection name

    $document \Zend_Cloud_DocumentService_Document
    $options array
    methodpublicselect( string $fields = null ) : \Zend_Cloud_DocumentService_Query

    Create query statement

    Parameters
    Name Type Description
    $fields string
    Returns
    Type Description
    \Zend_Cloud_DocumentService_Query
    methodpublicupdateDocument( 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.

    Fields not specified in the set will be left as-is.

    Parameters
    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
    Returns
    Type Description
    boolean
    Documentation was generated by DocBlox 0.15.1.