File indexing completed on 2025-01-26 05:24:52
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 QueueService 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/QueueService/Adapter.php'; 0021 // require_once 'Zend/Cloud/QueueService/Message.php'; 0022 // require_once 'Zend/Cloud/QueueService/MessageSet.php'; 0023 0024 /** 0025 * Abstract queue adapter 0026 * 0027 * Provides functionality around setting message and message set classes. 0028 * 0029 * @category Zend 0030 * @package Zend_Cloud 0031 * @subpackage QueueService 0032 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0033 * @license http://framework.zend.com/license/new-bsd New BSD License 0034 */ 0035 abstract class Zend_Cloud_QueueService_Adapter_AbstractAdapter 0036 implements Zend_Cloud_QueueService_Adapter 0037 { 0038 /**@+ option keys */ 0039 const MESSAGE_CLASS = 'message_class'; 0040 const MESSAGESET_CLASS = 'messageset_class'; 0041 /**@-*/ 0042 0043 /** @var string Class to use for queue messages */ 0044 protected $_messageClass = 'Zend_Cloud_QueueService_Message'; 0045 0046 /** @var string Class to use for collections of queue messages */ 0047 protected $_messageSetClass = 'Zend_Cloud_QueueService_MessageSet'; 0048 0049 /** 0050 * Set class to use for message objects 0051 * 0052 * @param string $class 0053 * @return Zend_Cloud_QueueService_Adapter_AbstractAdapter 0054 */ 0055 public function setMessageClass($class) 0056 { 0057 $this->_messageClass = (string) $class; 0058 return $this; 0059 } 0060 0061 /** 0062 * Get class to use for message objects 0063 * 0064 * @return string 0065 */ 0066 public function getMessageClass() 0067 { 0068 return $this->_messageClass; 0069 } 0070 0071 /** 0072 * Set class to use for message collection objects 0073 * 0074 * @param string $class 0075 * @return Zend_Cloud_QueueService_Adapter_AbstractAdapter 0076 */ 0077 public function setMessageSetClass($class) 0078 { 0079 $this->_messageSetClass = (string) $class; 0080 return $this; 0081 } 0082 0083 /** 0084 * Get class to use for message collection objects 0085 * 0086 * @return string 0087 */ 0088 public function getMessageSetClass() 0089 { 0090 return $this->_messageSetClass; 0091 } 0092 }