summaryrefslogtreecommitdiff
path: root/extlib/Stomp/Frame.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-09-15 14:40:57 -0700
committerZach Copley <zach@controlyourself.ca>2009-09-15 14:40:57 -0700
commit44af6a9bb456c597b5a8feb167ab8d71d71dd0c7 (patch)
tree32857c3b92e47fd4c4fbd2e603dae36c31345b50 /extlib/Stomp/Frame.php
parentd2bf5761225835470d2dcc80fdba2149d1ed51cd (diff)
parentd7e13e847dbce55ad8ed017f02e1ac8420881e4e (diff)
Merge branch '0.8.x' of git@gitorious.org:statusnet/mainline into 0.8.x
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