Update the php documentation
parent
957f9528dc
commit
df9b30bbb3
|
@ -5,11 +5,12 @@ class Stomp {
|
||||||
/**
|
/**
|
||||||
* Connect to server
|
* Connect to server
|
||||||
*
|
*
|
||||||
* @param string $broker Broker URI
|
* @param string $broker The broker URI
|
||||||
* @param string $username The username
|
* @param string $username The username
|
||||||
* @param string $password The password
|
* @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 $destination indicates where to send the message
|
||||||
* @param string|StompFrame $msg message to be sent
|
* @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
|
* @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
|
* Register to listen to a given destination
|
||||||
*
|
*
|
||||||
* @param string $destination indicates which destination to subscribe to
|
* @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
|
* @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
|
* Remove an existing subscription
|
||||||
*
|
*
|
||||||
* @param string $destination indicates which subscription to remove
|
* @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
|
* @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
|
* Acknowledge consumption of a message from a subscription using client acknowledgment
|
||||||
*
|
*
|
||||||
* @param string|StompFrame $msg message/messageId to be acknowledged
|
* @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
|
* @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 {
|
class StompException extends Exception {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the stomp server error details
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getDetails() {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,9 +14,10 @@ function stomp_version() {
|
||||||
* @param string $broker broker URI
|
* @param string $broker broker URI
|
||||||
* @param string $username The username
|
* @param string $username The username
|
||||||
* @param string $password The password
|
* @param string $password The password
|
||||||
|
* @param array $headers additional headers (example: receipt).
|
||||||
* @return Ressource stomp connection identifier on success, or FALSE on failure
|
* @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 ressource $link identifier returned by stomp_connect
|
||||||
* @param string $destination indicates where to send the message
|
* @param string $destination indicates where to send the message
|
||||||
* @param string|StompFrame $msg message to be sent
|
* @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
|
* @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 ressource $link identifier returned by stomp_connect
|
||||||
* @param string $destination indicates which destination to subscribe to
|
* @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
|
* @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 ressource $link identifier returned by stomp_connect
|
||||||
* @param string $destination indicates which subscription to remove
|
* @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
|
* @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 ressource $link identifier returned by stomp_connect
|
||||||
* @param string|StompFrame $msg message/messageId to be acknowledged
|
* @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
|
* @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()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue