File indexing completed on 2024-12-22 05:36:57
0001 <?php 0002 /** 0003 * Zend Framework 0004 * 0005 * LICENSE 0006 * 0007 * This source file is subject to the new BSD license that is bundled 0008 * with this package in the file LICENSE.txt. 0009 * It is also available through the world-wide-web at this URL: 0010 * http://framework.zend.com/license/new-bsd 0011 * If you did not receive a copy of the license and are unable to 0012 * obtain it through the world-wide-web, please send an email 0013 * to license@zend.com so we can send you a copy immediately. 0014 * 0015 * @category Zend 0016 * @package Zend_Queue 0017 * @subpackage Stomp 0018 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0019 * @license http://framework.zend.com/license/new-bsd New BSD License 0020 * @version $Id$ 0021 */ 0022 0023 /** 0024 * This class represents a Stomp Frame Interface 0025 * 0026 * @category Zend 0027 * @package Zend_Queue 0028 * @subpackage Stomp 0029 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) 0030 * @license http://framework.zend.com/license/new-bsd New BSD License 0031 */ 0032 interface Zend_Queue_Stomp_FrameInterface 0033 { 0034 /** 0035 * Get the status of the auto content length 0036 * 0037 * If AutoContentLength is true this code will automatically put the 0038 * content-length header in, even if it is already set by the user. 0039 * 0040 * This is done to make the message sending more reliable. 0041 * 0042 * @return boolean 0043 */ 0044 public function getAutoContentLength(); 0045 0046 /** 0047 * setAutoContentLength() 0048 * 0049 * Set the value on or off. 0050 * 0051 * @param boolean $auto 0052 * @return $this; 0053 * @throws Zend_Queue_Exception 0054 */ 0055 public function setAutoContentLength($auto); 0056 0057 /** 0058 * Get the headers 0059 * 0060 * @return array 0061 */ 0062 public function getHeaders(); 0063 0064 /** 0065 * Set the headers 0066 * 0067 * Throws an exception if the array values are not strings. 0068 * 0069 * @param array $headers 0070 * @return $this 0071 * @throws Zend_Queue_Exception 0072 */ 0073 public function setHeaders(array $headers); 0074 0075 /** 0076 * Returns a value for a header 0077 * returns false if the header does not exist 0078 * 0079 * @param string $header 0080 * @return $string 0081 * @throws Zend_Queue_Exception 0082 */ 0083 public function getHeader($header); 0084 0085 /** 0086 * Returns a value for a header 0087 * returns false if the header does not exist 0088 * 0089 * @param string $header 0090 * @param string $value 0091 * @return $this 0092 * @throws Zend_Queue_Exception 0093 */ 0094 public function setHeader($header, $value); 0095 0096 /** 0097 * Return the body for this frame 0098 * returns false if the body does not exist 0099 * 0100 * @return $this 0101 */ 0102 public function getBody(); 0103 0104 /** 0105 * Set the body for this frame 0106 * returns false if the body does not exist 0107 * 0108 * Set to null for no body. 0109 * 0110 * @param string|null $body 0111 * @return $this 0112 * @throws Zend_Queue_Exception 0113 */ 0114 public function setBody($body); 0115 0116 /** 0117 * Return the command for this frame 0118 * return false if the command does not exist 0119 * 0120 * @return $this 0121 */ 0122 public function getCommand(); 0123 0124 /** 0125 * Set the body for this frame 0126 * returns false if the body does not exist 0127 * 0128 * @return $this 0129 * @throws Zend_Queue_Exception 0130 */ 0131 public function setCommand($command); 0132 0133 0134 /** 0135 * Takes the current parameters and returns a Stomp Frame 0136 * 0137 * @throws Zend_Queue_Exception 0138 * @return string 0139 */ 0140 public function toFrame(); 0141 0142 /** 0143 * @see toFrame() 0144 */ 0145 public function __toString(); 0146 0147 /** 0148 * Accepts a frame and deconstructs the frame into its' component parts 0149 * 0150 * @param string $frame - a stomp frame 0151 * @return $this 0152 */ 0153 public function fromFrame($frame); 0154 }