From df9b30bbb3dd49a0ae8add35d88da6a2a49debc0 Mon Sep 17 00:00:00 2001 From: Pierrick Charron Date: Wed, 13 Oct 2010 03:39:55 +0000 Subject: [PATCH] Update the php documentation --- doc/classes.php | 29 +++++++++++++++++++---------- doc/functions.php | 19 ++++++++++--------- 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/doc/classes.php b/doc/classes.php index a4fd629..0cfc554 100644 --- a/doc/classes.php +++ b/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 @@ class Stomp { * * @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 @@ class Stomp { * 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() { + } } diff --git a/doc/functions.php b/doc/functions.php index 5a19e6f..98486fc 100644 --- a/doc/functions.php +++ b/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()) { } /**