web/lib/Zend/Cloud/DocumentService/Factory.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
equal deleted inserted replaced
805:5e7a0fedabdf 807:877f952ae2bd
    13  * to license@zend.com so we can send you a copy immediately.
    13  * to license@zend.com so we can send you a copy immediately.
    14  *
    14  *
    15  * @category   Zend
    15  * @category   Zend
    16  * @package    Zend_Cloud
    16  * @package    Zend_Cloud
    17  * @subpackage DocumentService
    17  * @subpackage DocumentService
    18  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    18  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    19  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    20  */
    20  */
    21 
    21 
    22 require_once 'Zend/Cloud/AbstractFactory.php';
    22 require_once 'Zend/Cloud/AbstractFactory.php';
    23 
    23 
    24 /**
    24 /**
    25  * Class implementing working with Azure queries in a structured way
    25  * Class implementing working with Azure queries in a structured way
    26  * 
    26  *
    27  * TODO Look into preventing a query injection attack.
    27  * TODO Look into preventing a query injection attack.
    28  *
    28  *
    29  * @category   Zend
    29  * @category   Zend
    30  * @package    Zend_Cloud
    30  * @package    Zend_Cloud
    31  * @subpackage DocumentService
    31  * @subpackage DocumentService
    32  * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
    32  * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
    33  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    33  * @license    http://framework.zend.com/license/new-bsd     New BSD License
    34  */
    34  */
    35 class Zend_Cloud_DocumentService_Factory extends Zend_Cloud_AbstractFactory
    35 class Zend_Cloud_DocumentService_Factory extends Zend_Cloud_AbstractFactory
    36 {
    36 {
    37     const DOCUMENT_ADAPTER_KEY = 'document_adapter';
    37     const DOCUMENT_ADAPTER_KEY = 'document_adapter';
    41      */
    41      */
    42     protected static $_adapterInterface = 'Zend_Cloud_DocumentService_Adapter';
    42     protected static $_adapterInterface = 'Zend_Cloud_DocumentService_Adapter';
    43 
    43 
    44     /**
    44     /**
    45      * Constructor
    45      * Constructor
    46      * 
    46      *
    47      * @return void
    47      * @return void
    48      */
    48      */
    49     private function __construct()
    49     private function __construct()
    50     {
    50     {
    51         // private ctor - should not be used
    51         // private ctor - should not be used
    52     }
    52     }
    53     
    53 
    54     /**
    54     /**
    55      * Retrieve an adapter instance
    55      * Retrieve an adapter instance
    56      * 
    56      *
    57      * @param array $options 
    57      * @param array $options
    58      * @return void
    58      * @return void
    59      */
    59      */
    60     public static function getAdapter($options = array()) 
    60     public static function getAdapter($options = array())
    61     {
    61     {
    62         $adapter = parent::_getAdapter(self::DOCUMENT_ADAPTER_KEY, $options);
    62         $adapter = parent::_getAdapter(self::DOCUMENT_ADAPTER_KEY, $options);
    63         if (!$adapter) {
    63         if (!$adapter) {
    64             require_once 'Zend/Cloud/DocumentService/Exception.php';
    64             require_once 'Zend/Cloud/DocumentService/Exception.php';
    65             throw new Zend_Cloud_DocumentService_Exception(
    65             throw new Zend_Cloud_DocumentService_Exception(