File indexing completed on 2025-01-26 05:24:51
0001 <?php 0002 /** 0003 * LICENSE 0004 * 0005 * This source file is subject to the new BSD license that is bundled 0006 * with this package in the file LICENSE.txt. 0007 * It is also available through the world-wide-web at this URL: 0008 * http://framework.zend.com/license/new-bsd 0009 * If you did not receive a copy of the license and are unable to 0010 * obtain it through the world-wide-web, please send an email 0011 * to license@zend.com so we can send you a copy immediately. 0012 * 0013 * @category Zend 0014 * @package Zend_Cloud 0015 * @subpackage DocumentService 0016 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0017 * @license http://framework.zend.com/license/new-bsd New BSD License 0018 */ 0019 0020 // require_once 'Zend/Cloud/DocumentService/Adapter.php'; 0021 // require_once 'Zend/Cloud/DocumentService/Document.php'; 0022 // require_once 'Zend/Cloud/DocumentService/DocumentSet.php'; 0023 // require_once 'Zend/Cloud/DocumentService/Query.php'; 0024 0025 /** 0026 * Abstract document service adapter 0027 * 0028 * Provides functionality surrounding setting classes for each of: 0029 * - document objects 0030 * - document set objects 0031 * - query class objects 0032 * 0033 * @category Zend 0034 * @package Zend_Cloud 0035 * @subpackage DocumentService 0036 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0037 * @license http://framework.zend.com/license/new-bsd New BSD License 0038 */ 0039 abstract class Zend_Cloud_DocumentService_Adapter_AbstractAdapter 0040 implements Zend_Cloud_DocumentService_Adapter 0041 { 0042 const DOCUMENT_CLASS = 'document_class'; 0043 const DOCUMENTSET_CLASS = 'documentset_class'; 0044 const QUERY_CLASS = 'query_class'; 0045 0046 /** 0047 * Class to utilize for new document objects 0048 * @var string 0049 */ 0050 protected $_documentClass = 'Zend_Cloud_DocumentService_Document'; 0051 0052 /** 0053 * Class to utilize for new document set objects 0054 * @var string 0055 */ 0056 protected $_documentSetClass = 'Zend_Cloud_DocumentService_DocumentSet'; 0057 0058 /** 0059 * Class to utilize for new query objects 0060 * 0061 * @var string 0062 */ 0063 protected $_queryClass = 'Zend_Cloud_DocumentService_Query'; 0064 0065 /** 0066 * Set the class for document objects 0067 * 0068 * @param string $class 0069 * @return Zend_Cloud_DocumentService_Adapter_AbstractAdapter 0070 */ 0071 public function setDocumentClass($class) 0072 { 0073 $this->_documentClass = (string) $class; 0074 return $this; 0075 } 0076 0077 /** 0078 * Get the class for document objects 0079 * 0080 * @return string 0081 */ 0082 public function getDocumentClass() 0083 { 0084 return $this->_documentClass; 0085 } 0086 0087 /** 0088 * Set the class for document set objects 0089 * 0090 * @param string $class 0091 * @return Zend_Cloud_DocumentService_Adapter_AbstractAdapter 0092 */ 0093 public function setDocumentSetClass($class) 0094 { 0095 $this->_documentSetClass = (string) $class; 0096 return $this; 0097 } 0098 0099 /** 0100 * Get the class for document set objects 0101 * 0102 * @return string 0103 */ 0104 public function getDocumentSetClass() 0105 { 0106 return $this->_documentSetClass; 0107 } 0108 0109 /** 0110 * Set the query class for query objects 0111 * 0112 * @param string $class 0113 * @return Zend_Cloud_DocumentService_Adapter_AbstractAdapter 0114 */ 0115 public function setQueryClass($class) 0116 { 0117 $this->_queryClass = (string) $class; 0118 return $this; 0119 } 0120 0121 /** 0122 * Get the class for query objects 0123 * 0124 * @return string 0125 */ 0126 public function getQueryClass() 0127 { 0128 return $this->_queryClass; 0129 } 0130 }