summaryrefslogtreecommitdiff
path: root/extlib/Stomp/Frame.php
diff options
context:
space:
mode:
Diffstat (limited to 'extlib/Stomp/Frame.php')
-rw-r--r--extlib/Stomp/Frame.php87
1 files changed, 43 insertions, 44 deletions
diff --git a/extlib/Stomp/Frame.php b/extlib/Stomp/Frame.php
index 9fd97b4f5..dc59c1cb7 100644
--- a/extlib/Stomp/Frame.php
+++ b/extlib/Stomp/Frame.php
@@ -17,46 +17,46 @@
*/
/* vim: set expandtab tabstop=3 shiftwidth=3: */
-
-/**
- * Stomp Frames are messages that are sent and received on a StompConnection.
- *
- * @package Stomp
- * @author Hiram Chirino <hiram@hiramchirino.com>
- * @author Dejan Bosanac <dejan@nighttale.net>
- * @author Michael Caplan <mcaplan@labnet.net>
- * @version $Revision: 36 $
- */
-class Stomp_Frame
-{
- public $command;
- public $headers = array();
- public $body;
-
- /**
- * Constructor
- *
- * @param string $command
- * @param array $headers
- * @param string $body
- */
- public function __construct ($command = null, $headers = null, $body = null)
- {
- $this->_init($command, $headers, $body);
- }
-
- protected function _init ($command = null, $headers = null, $body = null)
- {
- $this->command = $command;
- if ($headers != null) {
- $this->headers = $headers;
- }
- $this->body = $body;
-
- if ($this->command == 'ERROR') {
- require_once 'Stomp/Exception.php';
- throw new Stomp_Exception($this->headers['message'], 0, $this->body);
- }
+
+/**
+ * Stomp Frames are messages that are sent and received on a StompConnection.
+ *
+ * @package Stomp
+ * @author Hiram Chirino <hiram@hiramchirino.com>
+ * @author Dejan Bosanac <dejan@nighttale.net>
+ * @author Michael Caplan <mcaplan@labnet.net>
+ * @version $Revision: 36 $
+ */
+class Stomp_Frame
+{
+ public $command;
+ public $headers = array();
+ public $body;
+
+ /**
+ * Constructor
+ *
+ * @param string $command
+ * @param array $headers
+ * @param string $body
+ */
+ public function __construct ($command = null, $headers = null, $body = null)
+ {
+ $this->_init($command, $headers, $body);
+ }
+
+ protected function _init ($command = null, $headers = null, $body = null)
+ {
+ $this->command = $command;
+ if ($headers != null) {
+ $this->headers = $headers;
+ }
+ $this->body = $body;
+
+ if ($this->command == 'ERROR') {
+ require_once 'Stomp/Exception.php';
+ throw new Stomp_Exception($this->headers['message'], 0, $this->body);
+ }
}
/**
@@ -74,8 +74,7 @@ class Stomp_Frame
$data .= "\n";
$data .= $this->body;
- $data .= "\x00\n"; // Should there really be a linefeed here?
- return $data;
- }
-}
+ return $data .= "\x00\n";
+ }
+}
?> \ No newline at end of file