Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update the php documentation

  • Loading branch information...
commit df9b30bbb3dd49a0ae8add35d88da6a2a49debc0 1 parent 957f952
@adoy adoy authored
Showing with 29 additions and 19 deletions.
  1. +19 −10 doc/classes.php
  2. +10 −9 doc/functions.php
View
29 doc/classes.php
@@ -5,11 +5,12 @@ class Stomp {
/**
* Connect to server
*
- * @param string $broker Broker URI
+ * @param string $broker The broker URI
* @param string $username The username
* @param string $password The password
+ * @param array $headers additional headers (example: receipt).
*/
- public function __construct($broker = null, $username = null, $password = null) {
+ public function __construct($broker = null, $username = null, $password = null, array $headers = array()) {
}
/**
@@ -33,30 +34,30 @@ public function disconnect() {
*
* @param string $destination indicates where to send the message
* @param string|StompFrame $msg message to be sent
- * @param array $properties extra properties (example: receipt, transaction)
+ * @param array $headers additional headers (example: receipt).
* @return boolean TRUE on success, or FALSE on failure
*/
- public function send($destination, $msg, array $properties = array()) {
+ public function send($destination, $msg, array $headers = array()) {
}
/**
* Register to listen to a given destination
*
* @param string $destination indicates which destination to subscribe to
- * @param array $properties extra properties (example: receipt, transaction, id)
+ * @param array $headers additional headers (example: receipt).
* @return boolean TRUE on success, or FALSE on failure
*/
- public function subscribe($destination, array $properties = array()) {
+ public function subscribe($destination, array $headers = array()) {
}
/**
* Remove an existing subscription
*
* @param string $destination indicates which subscription to remove
- * @param array $properties extra properties (example: receipt, transaction, id)
+ * @param array $headers additional headers (example: receipt).
* @return boolean TRUE on success, or FALSE on failure
*/
- public function unsubscribe($destination, array $properties = array()) {
+ public function unsubscribe($destination, array $headers = array()) {
}
/**
@@ -107,10 +108,10 @@ public function abort($transaction_id) {
* Acknowledge consumption of a message from a subscription using client acknowledgment
*
* @param string|StompFrame $msg message/messageId to be acknowledged
- * @param array $properties extra properties (example: receipt, transaction)
+ * @param array $headers additional headers (example: receipt).
* @return boolean TRUE on success, or FALSE on failure
*/
- public function ack($msg, array $properties = array()) {
+ public function ack($msg, array $headers = array()) {
}
/**
@@ -163,4 +164,12 @@ class StompFrame {
}
class StompException extends Exception {
+
+ /**
+ * Get the stomp server error details
+ *
+ * @return string
+ */
+ public function getDetails() {
+ }
}
View
19 doc/functions.php
@@ -14,9 +14,10 @@ function stomp_version() {
* @param string $broker broker URI
* @param string $username The username
* @param string $password The password
+ * @param array $headers additional headers (example: receipt).
* @return Ressource stomp connection identifier on success, or FALSE on failure
*/
-function stomp_connect($broker = null, $username = null, $password = null) {
+function stomp_connect($broker = null, $username = null, $password = null, array $headers = array()) {
}
/**
@@ -43,10 +44,10 @@ function stomp_close($link) {
* @param ressource $link identifier returned by stomp_connect
* @param string $destination indicates where to send the message
* @param string|StompFrame $msg message to be sent
- * @param array $properties extra properties (example: receipt, transaction)
+ * @param array $headers additional headers (example: receipt).
* @return boolean TRUE on success, or FALSE on failure
*/
-function stomp_send($link, $destination, $msg, array $properties = array()) {
+function stomp_send($link, $destination, $msg, array $headers = array()) {
}
/**
@@ -54,10 +55,10 @@ function stomp_send($link, $destination, $msg, array $properties = array()) {
*
* @param ressource $link identifier returned by stomp_connect
* @param string $destination indicates which destination to subscribe to
- * @param array $properties extra properties (example: receipt, transaction, id)
+ * @param array $headers additional headers (example: receipt).
* @return boolean TRUE on success, or FALSE on failure
*/
-function stomp_subscribe($link, $destination, array $properties = array()) {
+function stomp_subscribe($link, $destination, array $headers = array()) {
}
/**
@@ -65,10 +66,10 @@ function stomp_subscribe($link, $destination, array $properties = array()) {
*
* @param ressource $link identifier returned by stomp_connect
* @param string $destination indicates which subscription to remove
- * @param array $properties extra properties (example: receipt, transaction, id)
+ * @param array $headers additional headers (example: receipt).
* @return boolean TRUE on success, or FALSE on failure
*/
-function stomp_unsubscribe($link, $destination, array $properties = array()) {
+function stomp_unsubscribe($link, $destination, array $headers = array()) {
}
/**
@@ -124,10 +125,10 @@ function stomp_abort($link, $transaction_id) {
*
* @param ressource $link identifier returned by stomp_connect
* @param string|StompFrame $msg message/messageId to be acknowledged
- * @param array $properties extra properties (example: receipt, transaction)
+ * @param array $headers additional headers (example: receipt).
* @return boolean TRUE on success, or FALSE on failure
*/
-function stomp_ack($link, $msg, array $properties = array()) {
+function stomp_ack($link, $msg, array $headers = array()) {
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.