Cloud/DocumentService/Adapter.php

Show: PublicProtectedPrivateinherited
    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-2014 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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
    License
    New BSD License  

    Constants

    >VConstant  HTTP_ADAPTER = 'http_adapter'

    Methods

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

    Create collection.

    Parameters
    NameTypeDescription
    $namestring
    $optionsarray
    Returns
    TypeDescription
    array
    methodpublicdeleteCollection(string $name, array $options = null) : void

    Delete collection.

    Parameters
    NameTypeDescription
    $namestring
    $optionsarray
    methodpublicdeleteDocument(string $collectionName, mixed $documentID, array $options = null) : void

    Delete document

    Parameters
    NameTypeDescription
    $collectionNamestring

    Collection name

    $documentIDmixed

    Document ID, adapter-dependent

    $optionsarray
    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
    NameTypeDescription
    $collectionNamestring

    Collection name

    $documentIDmixed

    Document ID, adapter-dependent

    $optionsarray
    Returns
    TypeDescription
    \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
    NameTypeDescription
    $collectionNamestring

    Collection name

    $document\Zend_Cloud_DocumentService_Document

    Document to insert

    $optionsarray
    Returns
    TypeDescription
    boolean
    methodpubliclistCollections(array $options = null) : array

    List collections.

    Parameters
    NameTypeDescription
    $optionsarray
    Returns
    TypeDescription
    arrayList of collection names
    methodpubliclistDocuments(string $collectionName, null | array $options = null) : \Zend_Cloud_DocumentService_DocumentSet

    List all documents in a collection

    Parameters
    NameTypeDescription
    $collectionNamestring
    $optionsnull | array
    Returns
    TypeDescription
    \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
    NameTypeDescription
    $collectionNamestring

    Collection name

    $querystring
    $optionsarray
    Returns
    TypeDescription
    arrayArray 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
    NameTypeDescription
    $collectionNamestring

    Collection name

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

    Create query statement

    Parameters
    NameTypeDescription
    $fieldsstring
    Returns
    TypeDescription
    \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
    NameTypeDescription
    $collectionNamestring
    $documentIDmixed | \Zend_Cloud_DocumentService_Document

    Document ID, adapter-dependent, or document containing updates

    $fieldsetarray | \Zend_Cloud_DocumentService_Document

    Set of fields to update

    $optionsarray
    Returns
    TypeDescription
    boolean
    Documentation was generated by phpDocumentor 2.2.0 .