-<?php
-/**
- *
- * Copyright 2005-2006 The Apache Software Foundation
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/* vim: set expandtab tabstop=3 shiftwidth=3: */
+<?php\r
+/**\r
+ *\r
+ * Copyright 2005-2006 The Apache Software Foundation\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+/* vim: set expandtab tabstop=3 shiftwidth=3: */\r
\r
/**\r
- * Stomp Frames are messages that are sent and received on a StompConnection.\r
+ * Stomp Frames are messages that are sent and received on a stomp connection.\r
*\r
* @package Stomp\r
- * @author Hiram Chirino <hiram@hiramchirino.com>\r
- * @author Dejan Bosanac <dejan@nighttale.net>\r
- * @author Michael Caplan <mcaplan@labnet.net>\r
- * @version $Revision: 36 $\r
*/\r
-class Stomp_Frame\r
+class StompFrame\r
{\r
public $command;\r
public $headers = array();\r
$this->body = $body;\r
\r
if ($this->command == 'ERROR') {\r
- require_once 'Stomp/Exception.php';\r
- throw new Stomp_Exception($this->headers['message'], 0, $this->body);\r
+ require_once 'Exception.php';\r
+ throw new StompException($this->headers['message'], 0, $this->body);\r
+ }\r
+ }\r
+ \r
+ /**\r
+ * Convert frame to transportable string\r
+ *\r
+ * @return string\r
+ */\r
+ public function __toString()\r
+ {\r
+ $data = $this->command . "\n";\r
+ \r
+ foreach ($this->headers as $name => $value) {\r
+ $data .= $name . ": " . $value . "\n";\r
}\r
- }
-
- /**
- * Convert frame to transportable string
- *
- * @return string
- */
- public function __toString()
- {
- $data = $this->command . "\n";
-
- foreach ($this->headers as $name => $value) {
- $data .= $name . ": " . $value . "\n";
- }
-
- $data .= "\n";
- $data .= $this->body;
- return $data .= "\x00\n";
+ \r
+ $data .= "\n";\r
+ $data .= $this->body;\r
+ return $data .= "\x00";\r
}\r
}\r
?>
\ No newline at end of file