*prechod na novsiu verziu ZF
[sport-group.git] / library / Zend / Queue / Stomp / FrameInterface.php
blobc6ecc4ff540aab310cd17d290992709f2cc4856d
1 <?php
2 /**
3 * Zend Framework
5 * LICENSE
7 * This source file is subject to the new BSD license that is bundled
8 * with this package in the file LICENSE.txt.
9 * It is also available through the world-wide-web at this URL:
10 * http://framework.zend.com/license/new-bsd
11 * If you did not receive a copy of the license and are unable to
12 * obtain it through the world-wide-web, please send an email
13 * to license@zend.com so we can send you a copy immediately.
15 * @category Zend
16 * @package Zend_Queue
17 * @subpackage Stomp
18 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
19 * @license http://framework.zend.com/license/new-bsd New BSD License
20 * @version $Id: FrameInterface.php 16971 2009-07-22 18:05:45Z mikaelkael $
23 /**
24 * This class represents a Stomp Frame Interface
26 * @category Zend
27 * @package Zend_Queue
28 * @subpackage Stomp
29 * @copyright Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
30 * @license http://framework.zend.com/license/new-bsd New BSD License
32 interface Zend_Queue_Stomp_FrameInterface
34 /**
35 * Get the status of the auto content length
37 * If AutoContentLength is true this code will automatically put the
38 * content-length header in, even if it is already set by the user.
40 * This is done to make the message sending more reliable.
42 * @return boolean
44 public function getAutoContentLength();
46 /**
47 * setAutoContentLength()
49 * Set the value on or off.
51 * @param boolean $auto
52 * @return $this;
53 * @throws Zend_Queue_Exception
55 public function setAutoContentLength($auto);
57 /**
58 * Get the headers
60 * @return array
62 public function getHeaders();
64 /**
65 * Set the headers
67 * Throws an exception if the array values are not strings.
69 * @param array $headers
70 * @return $this
71 * @throws Zend_Queue_Exception
73 public function setHeaders(array $headers);
75 /**
76 * Returns a value for a header
77 * returns false if the header does not exist
79 * @param string $header
80 * @return $string
81 * @throws Zend_Queue_Exception
83 public function getHeader($header);
85 /**
86 * Returns a value for a header
87 * returns false if the header does not exist
89 * @param string $header
90 * @param string $value
91 * @return $this
92 * @throws Zend_Queue_Exception
94 public function setHeader($header, $value);
96 /**
97 * Return the body for this frame
98 * returns false if the body does not exist
100 * @return $this
102 public function getBody();
105 * Set the body for this frame
106 * returns false if the body does not exist
108 * Set to null for no body.
110 * @param string|null $body
111 * @return $this
112 * @throws Zend_Queue_Exception
114 public function setBody($body);
117 * Return the command for this frame
118 * return false if the command does not exist
120 * @return $this
122 public function getCommand();
125 * Set the body for this frame
126 * returns false if the body does not exist
128 * @return $this
129 * @throws Zend_Queue_Exception
131 public function setCommand($command);
135 * Takes the current parameters and returns a Stomp Frame
137 * @throws Zend_Queue_Exception
138 * @return string
140 public function toFrame();
143 * @see toFrame()
145 public function __toString();
148 * Accepts a frame and deconstructs the frame into its' component parts
150 * @param string $frame - a stomp frame
151 * @return $this
153 public function fromFrame($frame);