1<?php 2 3/** 4 * Get the current version of the stomp extension 5 * 6 * @return string version 7 */ 8function stomp_version() { 9} 10 11/** 12 * Connect to server 13 * 14 * @param string $broker broker URI 15 * @param string $username The username 16 * @param string $password The password 17 * @param array $headers additional headers (example: receipt). 18 * @return Ressource stomp connection identifier on success, or FALSE on failure 19 */ 20function stomp_connect($broker = null, $username = null, $password = null, array $headers = array()) { 21} 22 23/** 24 * Get the current stomp session ID 25 * 26 * @param ressource $link identifier returned by stomp_connect 27 * @return string stomp session ID if it exists, or FALSE otherwise 28 */ 29function stomp_get_session_id($link) { 30} 31 32/** 33 * Close stomp connection 34 * 35 * @param ressource $link identifier returned by stomp_connect 36 * @return boolean TRUE on success, or FALSE on failure 37 */ 38function stomp_close($link) { 39} 40 41/** 42 * Sends a message to a destination in the messaging system 43 * 44 * @param ressource $link identifier returned by stomp_connect 45 * @param string $destination indicates where to send the message 46 * @param string|StompFrame $msg message to be sent 47 * @param array $headers additional headers (example: receipt). 48 * @return boolean TRUE on success, or FALSE on failure 49 */ 50function stomp_send($link, $destination, $msg, array $headers = array()) { 51} 52 53/** 54 * Register to listen to a given destination 55 * 56 * @param ressource $link identifier returned by stomp_connect 57 * @param string $destination indicates which destination to subscribe to 58 * @param array $headers additional headers (example: receipt). 59 * @return boolean TRUE on success, or FALSE on failure 60 */ 61function stomp_subscribe($link, $destination, array $headers = array()) { 62} 63 64/** 65 * Remove an existing subscription 66 * 67 * @param ressource $link identifier returned by stomp_connect 68 * @param string $destination indicates which subscription to remove 69 * @param array $headers additional headers (example: receipt). 70 * @return boolean TRUE on success, or FALSE on failure 71 */ 72function stomp_unsubscribe($link, $destination, array $headers = array()) { 73} 74 75/** 76 * Indicate whether or not there is a frame ready to read 77 * 78 * @param ressource $link identifier returned by stomp_connect 79 * @return boolean TRUE if there is one, or FALSE otherwise 80 */ 81function stomp_has_frame($link) { 82} 83 84/** 85 * Read the next frame 86 * 87 * @param ressource $link identifier returned by stomp_connect 88 * @return array on success, or FALSE on failure 89 */ 90function stomp_read_frame($link) { 91} 92 93/** 94 * Start a transaction 95 * 96 * @param ressource $link identifier returned by stomp_connect 97 * @param string $transaction_id transaction id 98 * @return boolean TRUE on success, or FALSE on failure 99 */ 100function stomp_begin($link, $transaction_id) { 101} 102 103/** 104 * Commit a transaction in progress 105 * 106 * @param ressource $link identifier returned by stomp_connect 107 * @param string $transaction_id transaction id 108 * @return boolean TRUE on success, or FALSE on failure 109 */ 110function stomp_commit($link, $transaction_id) { 111} 112 113/** 114 * Roll back a transaction in progress 115 * 116 * @param ressource $link identifier returned by stomp_connect 117 * @param string $transaction_id transaction id 118 * @return boolean TRUE on success, or FALSE on failure 119 */ 120function stomp_abort($link, $transaction_id) { 121} 122 123/** 124 * Acknowledge consumption of a message from a subscription using client acknowledgment 125 * 126 * @param ressource $link identifier returned by stomp_connect 127 * @param string|StompFrame $msg message/messageId to be acknowledged 128 * @param array $headers additional headers (example: receipt). 129 * @return boolean TRUE on success, or FALSE on failure 130 */ 131function stomp_ack($link, $msg, array $headers = array()) { 132} 133 134/** 135 * Get the last stomp error 136 * 137 * @param ressource $link identifier returned by stomp_connect 138 * @return string Error message, or FALSE if no error 139 */ 140function stomp_error($link) { 141} 142 143/** 144 * Set timeout 145 * 146 * @param ressource $link identifier returned by stomp_connect 147 * @param int $seconds the seconds part of the timeout to be set 148 * @param int $microseconds the microseconds part of the timeout to be set 149 * @return void 150 */ 151function stomp_set_timeout($link, $seconds, $microseconds = 0) { 152} 153 154/** 155 * Get timeout 156 * 157 * @param ressource $link identifier returned by stomp_connect 158 * @return array Array with timeout informations 159 */ 160function stomp_get_timeout($link) { 161} 162