diff --git a/reference/amqp/amqpchannel.xml b/reference/amqp/amqpchannel.xml new file mode 100644 index 0000000000..e1e1b25276 --- /dev/null +++ b/reference/amqp/amqpchannel.xml @@ -0,0 +1,67 @@ + + + + + + The AMQPChannel class + AMQPChannel + + + + +
+ &reftitle.intro; + + Represents a channel on an connection. Each connection can have multiple channels. + +
+ + +
+ &reftitle.classsynopsis; + + + + AMQPChannel + + + + + AMQPChannel + + + + + &Methods; + + + + +
+ +
+ + &reference.amqp.entities.amqpchannel; + +
+ + diff --git a/reference/amqp/amqpchannel/committransaction.xml b/reference/amqp/amqpchannel/committransaction.xml new file mode 100644 index 0000000000..99f3b8074b --- /dev/null +++ b/reference/amqp/amqpchannel/committransaction.xml @@ -0,0 +1,65 @@ + + + + + + AMQPChannel::commitTransaction + Commit a pending transaction + + + + &reftitle.description; + + public voidAMQPChannel::commitTransaction + + + + Commit an existing transaction. AMQPChannel::startTransaction must be called prior to this. + + + + + &reftitle.errors; + + Throws AMQPChannelException exception if no transaction was started prior to calling this method. + + + Throws AMQPConnectionException if the connection to the broker was lost. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpchannel/construct.xml b/reference/amqp/amqpchannel/construct.xml new file mode 100644 index 0000000000..2dfbcdbe90 --- /dev/null +++ b/reference/amqp/amqpchannel/construct.xml @@ -0,0 +1,71 @@ + + + + + + AMQPChannel::__construct + Create an instance of an AMQPQueue object + + + + &reftitle.description; + + AMQPChannel::__construct + AMQPConnectionamqp_connection + + + Creates an AMQPChannel instance representing a channel on the given connection. + + + + + &reftitle.parameters; + + + amqp_connection + + + A instance of AMQPConnection with an active connection to a broker. + + + + + + + + &reftitle.errors; + + Throws AMQPConnectionException if the connection to the broker was lost. + + + + + &reftitle.returnvalues; + + An instance of AMQPChannel. + + + + + + + diff --git a/reference/amqp/amqpchannel/isconnected.xml b/reference/amqp/amqpchannel/isconnected.xml new file mode 100644 index 0000000000..101ee53f00 --- /dev/null +++ b/reference/amqp/amqpchannel/isconnected.xml @@ -0,0 +1,56 @@ + + + + + + AMQPChannel::isConnected + Check the channel connection + + + + &reftitle.description; + + public voidAMQPChannel::isConnected + + + + Indicates whether the channel is connected. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + + + + + + + + diff --git a/reference/amqp/amqpchannel/qos.xml b/reference/amqp/amqpchannel/qos.xml new file mode 100644 index 0000000000..681c8e0b0d --- /dev/null +++ b/reference/amqp/amqpchannel/qos.xml @@ -0,0 +1,86 @@ + + + + + + AMQPChannel::qos + Set the Quality Of Service settings for the given channel + + + + &reftitle.description; + + public voidAMQPChannel::qos + intsize + intcount + + + Specify the amount of data to prefetch in terms of window size (octets) or number of messages from a queue during a AMQPQueue::consume or AMQPQueue::get method call. The client will prefetch data up to size octets or count messages from the server, whichever limit is hit first. + + + Setting either value to 0 will instruct the client to ignore that particular setting. + + + A call to AMQPChannel::qos will overwrite any values set by calling AMQPChannel::setPrefetchSize and AMQPChannel::setPrefetchCount. + + If the call to either AMQPQueue::consume or AMQPQueue::get is done with the AMQP_AUTOACK flag set, the client will not do any prefetching of data, regardless of the QOS settings. + + + + + &reftitle.parameters; + + + size + + + The window size, in octets, to prefetch. + + + + + count + + + The number of messages to prefetch. + + + + + + + + &reftitle.errors; + + Throws AMQPConnectionException if the connection to the broker was lost. + + + + + &reftitle.returnvalues; + + &return.success; + + + + + diff --git a/reference/amqp/amqpchannel/rollbacktransaction.xml b/reference/amqp/amqpchannel/rollbacktransaction.xml new file mode 100644 index 0000000000..e9bebc22b9 --- /dev/null +++ b/reference/amqp/amqpchannel/rollbacktransaction.xml @@ -0,0 +1,65 @@ + + + + + + AMQPChannel::rollbackTransaction + Rollback a transaction + + + + &reftitle.description; + + public voidAMQPChannel::rollbackTransaction + + + + Rollback an existing transaction. AMQPChannel::startTransaction must be called prior to this. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.errors; + + Throws AMQPChannelException exception if no transaction was started prior to calling this method. + + + Throws AMQPConnectionException if the connection to the broker was lost. + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpchannel/setprefetchcount.xml b/reference/amqp/amqpchannel/setprefetchcount.xml new file mode 100644 index 0000000000..49d07f87fb --- /dev/null +++ b/reference/amqp/amqpchannel/setprefetchcount.xml @@ -0,0 +1,75 @@ + + + + + + AMQPChannel::setPrefetchCount + Set the number of messages to prefetch from the broker + + + + &reftitle.description; + + public voidAMQPChannel::setPrefetchCount + intcount + + + Set the number of messages to prefetch from the broker during a call to AMQPQueue::consume or AMQPQueue::get. Any call to this method will automatically set the prefetch window size to 0, meaning that the prefetch window size setting will be ignored. + + + If the call to either AMQPQueue::consume or AMQPQueue::get is done with the AMQP_AUTOACK flag set, this setting will be ignored. + + + + + &reftitle.parameters; + + + count + + + The number of messages to prefetch. + + + + + + + + &reftitle.errors; + + Throws AMQPConnectionException if the connection to the broker was lost. + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpchannel/setprefetchsize.xml b/reference/amqp/amqpchannel/setprefetchsize.xml new file mode 100644 index 0000000000..c571330b74 --- /dev/null +++ b/reference/amqp/amqpchannel/setprefetchsize.xml @@ -0,0 +1,75 @@ + + + + + + AMQPChannel::setPrefetchSize + Set the window size to prefetch from the broker + + + + &reftitle.description; + + public voidAMQPChannel::setPrefetchSize + intsize + + + Set the prefetch window size, in octets, during a call to AMQPQueue::consume or AMQPQueue::get. Any call to this method will automatically set the prefetch message count to 0, meaning that the prefetch message count setting will be ignored. + + + If the call to either AMQPQueue::consume or AMQPQueue::get is done with the AMQP_AUTOACK flag set, this setting will be ignored. + + + + + &reftitle.parameters; + + + size + + + The window size, in octets, to prefetch. + + + + + + + + &reftitle.errors; + + Throws AMQPConnectionException if the connection to the broker was lost. + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpchannel/starttransaction.xml b/reference/amqp/amqpchannel/starttransaction.xml new file mode 100644 index 0000000000..01d8e0934b --- /dev/null +++ b/reference/amqp/amqpchannel/starttransaction.xml @@ -0,0 +1,62 @@ + + + + + + AMQPChannel::startTransaction + Start a transaction + + + + &reftitle.description; + + public voidAMQPChannel::startTransaction + + + + Commit an existing transaction. This method must be called on the given channel prior to calling AMQPChannel::commitTransaction or AMQPChannel::rollbackTransaction. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.errors; + + Throws AMQPConnectionException if the connection to the broker was lost. + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpchannelexception.xml b/reference/amqp/amqpchannelexception.xml new file mode 100644 index 0000000000..a2a5eeb795 --- /dev/null +++ b/reference/amqp/amqpchannelexception.xml @@ -0,0 +1,112 @@ + + + + + + The AMQPChannelException class + AMQPChannelException + + + + +
+ &reftitle.intro; + + + +
+ + +
+ &reftitle.classsynopsis; + + + + AMQPChannelException + + + + + AMQPChannelException + + + + extends + AMQPException + + + + &Properties; + + + &Methods; + + + &InheritedMethods; + + + + + +
+ + + +
+ &reftitle.properties; + + + message + + + + + + code + + + + + + file + + + + + + line + + + + + +
+ + + +
+ + &reference.amqp.entities.amqpchannelexception; + +
+ + diff --git a/reference/amqp/amqpconnection/construct.xml b/reference/amqp/amqpconnection/construct.xml index 712a4f4667..ed3ec814cd 100644 --- a/reference/amqp/amqpconnection/construct.xml +++ b/reference/amqp/amqpconnection/construct.xml @@ -41,9 +41,8 @@ - host - The host to connect too Max 32 characters + The host to connect too Max 1024 characters amqp.host @@ -53,17 +52,17 @@ vhost - The virtual host on the host Max 32 characters + The virtual host on the host Max 128 characters amqp.vhost login - The login name to use. Max 32 characters + The login name to use. Max 128 characters amqp.login password - Password Max 32 characters + Password Max 128 characters amqp.password @@ -123,8 +122,7 @@ $connection2 = new AMQPConnection(array( &reftitle.notes; - A connection will not be established untill - AMQPConnection::connect is called. + A connection will not be established until AMQPConnection::connect is called. diff --git a/reference/amqp/amqpconnection/gethost.xml b/reference/amqp/amqpconnection/gethost.xml new file mode 100644 index 0000000000..6c4ef4e457 --- /dev/null +++ b/reference/amqp/amqpconnection/gethost.xml @@ -0,0 +1,55 @@ + + + + + + AMQPConnection::getHost + Get the configured host + + + + &reftitle.description; + + public stringAMQPConnection::getHost + + + + Get the value of the configured host. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The configured host as a string. + + + + + + + diff --git a/reference/amqp/amqpconnection/getlogin.xml b/reference/amqp/amqpconnection/getlogin.xml new file mode 100644 index 0000000000..e229b42ef8 --- /dev/null +++ b/reference/amqp/amqpconnection/getlogin.xml @@ -0,0 +1,56 @@ + + + + + + AMQPConnection::getLogin + Get the configured login + + + + &reftitle.description; + + public stringAMQPConnection::getLogin + + + + Get the configured login. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The configured login as a string. + + + + + + + diff --git a/reference/amqp/amqpconnection/getpassword.xml b/reference/amqp/amqpconnection/getpassword.xml new file mode 100644 index 0000000000..62c15b660a --- /dev/null +++ b/reference/amqp/amqpconnection/getpassword.xml @@ -0,0 +1,55 @@ + + + + + + AMQPConnection::getPassword + Get the configured password + + + + &reftitle.description; + + public stringAMQPConnection::getPassword + + + + Get the configured password. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The configured password as a string. + + + + + + + diff --git a/reference/amqp/amqpconnection/getport.xml b/reference/amqp/amqpconnection/getport.xml new file mode 100644 index 0000000000..ef77086a8f --- /dev/null +++ b/reference/amqp/amqpconnection/getport.xml @@ -0,0 +1,58 @@ + + + + + + AMQPConnection::getPort + Get the configured port + + + + &reftitle.description; + + public intAMQPConnection::getPort + + + + + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The configured port as an integer. + + + + + + + diff --git a/reference/amqp/amqpconnection/getvhost.xml b/reference/amqp/amqpconnection/getvhost.xml new file mode 100644 index 0000000000..4c92697c8f --- /dev/null +++ b/reference/amqp/amqpconnection/getvhost.xml @@ -0,0 +1,55 @@ + + + + + + AMQPConnection::getVhost + Get the configured vhost + + + + &reftitle.description; + + public stringAMQPConnection::getVhost + + + + Get the configured vhost. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The configured virtual host as a string. + + + + + + + diff --git a/reference/amqp/amqpenvelope.xml b/reference/amqp/amqpenvelope.xml new file mode 100644 index 0000000000..3396c92a20 --- /dev/null +++ b/reference/amqp/amqpenvelope.xml @@ -0,0 +1,67 @@ + + + + + + The AMQPEnvelope class + AMQPEnvelope + + + + +
+ &reftitle.intro; + + Contains a message and all of its attributes. + +
+ + +
+ &reftitle.classsynopsis; + + + + AMQPEnvelope + + + + + AMQPEnvelope + + + + + &Methods; + + + + +
+ +
+ + &reference.amqp.entities.amqpenvelope; + +
+ + diff --git a/reference/amqp/amqpenvelope/getappid.xml b/reference/amqp/amqpenvelope/getappid.xml new file mode 100644 index 0000000000..9e81c1ce59 --- /dev/null +++ b/reference/amqp/amqpenvelope/getappid.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getAppId + Get the message appid + + + + &reftitle.description; + + public stringAMQPEnvelope::getAppId + + + + Get the application id of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The application id of the message. + + + + + diff --git a/reference/amqp/amqpenvelope/getbody.xml b/reference/amqp/amqpenvelope/getbody.xml new file mode 100644 index 0000000000..b7d5bd8de3 --- /dev/null +++ b/reference/amqp/amqpenvelope/getbody.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getBody + Get the message body + + + + &reftitle.description; + + public stringAMQPEnvelope::getBody + + + + Get the body of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The contents of the message body. + + + + + diff --git a/reference/amqp/amqpenvelope/getcontentencoding.xml b/reference/amqp/amqpenvelope/getcontentencoding.xml new file mode 100644 index 0000000000..ee78063042 --- /dev/null +++ b/reference/amqp/amqpenvelope/getcontentencoding.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getContentEncoding + Get the message contentencoding + + + + &reftitle.description; + + public stringAMQPEnvelope::getContentEncoding + + + + Get the content encoding of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The content encoding of the message. + + + + + diff --git a/reference/amqp/amqpenvelope/getcontenttype.xml b/reference/amqp/amqpenvelope/getcontenttype.xml new file mode 100644 index 0000000000..0c54b3f4bb --- /dev/null +++ b/reference/amqp/amqpenvelope/getcontenttype.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getContentType + Get the message contenttype + + + + &reftitle.description; + + public stringAMQPEnvelope::getContentType + + + + Get the content type of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The content type of the message. + + + + + diff --git a/reference/amqp/amqpenvelope/getcorrelationid.xml b/reference/amqp/amqpenvelope/getcorrelationid.xml new file mode 100644 index 0000000000..3d3da8c021 --- /dev/null +++ b/reference/amqp/amqpenvelope/getcorrelationid.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getCorrelationId + Get the message correlation id + + + + &reftitle.description; + + public stringAMQPEnvelope::getCorrelationId + + + + Get the correlation id of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The correlation id of the message. + + + + + diff --git a/reference/amqp/amqpenvelope/getdeliverytag.xml b/reference/amqp/amqpenvelope/getdeliverytag.xml new file mode 100644 index 0000000000..80ed68fcb6 --- /dev/null +++ b/reference/amqp/amqpenvelope/getdeliverytag.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getDeliveryTag + Get the message delivery tag + + + + &reftitle.description; + + public stringAMQPEnvelope::getDeliveryTag + + + + Get the delivery tag of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The delivery tag of the message. + + + + + diff --git a/reference/amqp/amqpenvelope/getexchange.xml b/reference/amqp/amqpenvelope/getexchange.xml new file mode 100644 index 0000000000..4d716fcb60 --- /dev/null +++ b/reference/amqp/amqpenvelope/getexchange.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getExchange + Get the message exchange + + + + &reftitle.description; + + public stringAMQPEnvelope::getExchange + + + + Get the exchange name on which the message was published. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The exchange name on which the message was published. + + + + + diff --git a/reference/amqp/amqpenvelope/getexpiration.xml b/reference/amqp/amqpenvelope/getexpiration.xml new file mode 100644 index 0000000000..5c8006e298 --- /dev/null +++ b/reference/amqp/amqpenvelope/getexpiration.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getExpiration + Get the message expiration + + + + &reftitle.description; + + public stringAMQPEnvelope::getExpiration + + + + Get the expiration of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The message expiration. + + + + + diff --git a/reference/amqp/amqpenvelope/getheader.xml b/reference/amqp/amqpenvelope/getheader.xml new file mode 100644 index 0000000000..3791cf0e5a --- /dev/null +++ b/reference/amqp/amqpenvelope/getheader.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getHeader + Get a specific message header + + + + &reftitle.description; + + public stringAMQPEnvelope::getHeader + stringheader_key + + + Get the the header value for a specific header key. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The contents of the specified header or &false; if not set. + + + + + diff --git a/reference/amqp/amqpenvelope/getheaders.xml b/reference/amqp/amqpenvelope/getheaders.xml new file mode 100644 index 0000000000..37e23676d5 --- /dev/null +++ b/reference/amqp/amqpenvelope/getheaders.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getHeaders + Get the message headers + + + + &reftitle.description; + + public arrayAMQPEnvelope::getHeaders + + + + Get the headers of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + An array of key value pairs associated with the message. + + + + + diff --git a/reference/amqp/amqpenvelope/getmessageid.xml b/reference/amqp/amqpenvelope/getmessageid.xml new file mode 100644 index 0000000000..da46950920 --- /dev/null +++ b/reference/amqp/amqpenvelope/getmessageid.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getMessageId + Get the message id + + + + &reftitle.description; + + public stringAMQPEnvelope::getMessageId + + + + Get the message id of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The message id. + + + + + diff --git a/reference/amqp/amqpenvelope/getpriority.xml b/reference/amqp/amqpenvelope/getpriority.xml new file mode 100644 index 0000000000..aacd26f1d0 --- /dev/null +++ b/reference/amqp/amqpenvelope/getpriority.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getPriority + Get the message priority + + + + &reftitle.description; + + public stringAMQPEnvelope::getPriority + + + + Get the priority of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The message priority. + + + + + diff --git a/reference/amqp/amqpenvelope/getreplyto.xml b/reference/amqp/amqpenvelope/getreplyto.xml new file mode 100644 index 0000000000..1b6b8fd5ae --- /dev/null +++ b/reference/amqp/amqpenvelope/getreplyto.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getReplyTo + Get the message replyto + + + + &reftitle.description; + + public stringAMQPEnvelope::getReplyTo + + + + Get the reply to of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The contents of the reply to field. + + + + + diff --git a/reference/amqp/amqpenvelope/getroutingkey.xml b/reference/amqp/amqpenvelope/getroutingkey.xml new file mode 100644 index 0000000000..1614affce4 --- /dev/null +++ b/reference/amqp/amqpenvelope/getroutingkey.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getRoutingKey + Get the message routing key + + + + &reftitle.description; + + public stringAMQPEnvelope::getRoutingKey + + + + Get the routing key of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The message routing key. + + + + + diff --git a/reference/amqp/amqpenvelope/gettimestamp.xml b/reference/amqp/amqpenvelope/gettimestamp.xml new file mode 100644 index 0000000000..627e52f845 --- /dev/null +++ b/reference/amqp/amqpenvelope/gettimestamp.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getTimeStamp + Get the message timestamp + + + + &reftitle.description; + + public stringAMQPEnvelope::getTimeStamp + + + + Get the timestamp of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The message timestamp. + + + + + diff --git a/reference/amqp/amqpenvelope/gettype.xml b/reference/amqp/amqpenvelope/gettype.xml new file mode 100644 index 0000000000..d643f78605 --- /dev/null +++ b/reference/amqp/amqpenvelope/gettype.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getType + Get the message type + + + + &reftitle.description; + + public stringAMQPEnvelope::getType + + + + Get the type of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The message type. + + + + + diff --git a/reference/amqp/amqpenvelope/getuserid.xml b/reference/amqp/amqpenvelope/getuserid.xml new file mode 100644 index 0000000000..c7ed08a877 --- /dev/null +++ b/reference/amqp/amqpenvelope/getuserid.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::getUserId + Get the message user id + + + + &reftitle.description; + + public stringAMQPEnvelope::getUserId + + + + Get the user id of the message. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The message user id. + + + + + diff --git a/reference/amqp/amqpenvelope/isredelivery.xml b/reference/amqp/amqpenvelope/isredelivery.xml new file mode 100644 index 0000000000..358430e622 --- /dev/null +++ b/reference/amqp/amqpenvelope/isredelivery.xml @@ -0,0 +1,54 @@ + + + + + + AMQPEnvelope::isRedelivery + Whether this is a redelivery of the message + + + + &reftitle.description; + + public boolAMQPEnvelope::isRedelivery + + + + Whether this is a redelivery of a message. If this message has been delivered and AMQPEnvelope::nack was called, the message will be put back on the queue to be redelivered, at which point the message will always return &true; when this method is called. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + &true; if this is a redelivery, &false; otherwise. + + + + + diff --git a/reference/amqp/amqpexception.xml b/reference/amqp/amqpexception.xml index 4705f066b5..3e5317f192 100644 --- a/reference/amqp/amqpexception.xml +++ b/reference/amqp/amqpexception.xml @@ -36,13 +36,13 @@ - Properties + &Properties; - Methods + &Methods; - Inherited methods + &InheritedMethods; diff --git a/reference/amqp/amqpexchange/bind.xml b/reference/amqp/amqpexchange/bind.xml index 137b218791..84465be031 100644 --- a/reference/amqp/amqpexchange/bind.xml +++ b/reference/amqp/amqpexchange/bind.xml @@ -4,18 +4,19 @@ AMQPExchange::bind - The bind purpose + Bind to another exchange &reftitle.description; public boolAMQPExchange::bind - stringqueue_name + stringdestination_exchange_name + stringsource_exchange_name stringrouting_key - Bind an exchange to a queue using the specified routing key. + Bind an exchange to another exchange using the specified routing key. @@ -24,10 +25,18 @@ - queue_name + destination_exchange_name - The name of the queue to which to bind. + The name of the destination exchange in the binding. + + + + + source_exchange_name + + + The name of the source exchange in the binding. @@ -55,6 +64,12 @@ Throws AMQPExchangeException on failure. + + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. + diff --git a/reference/amqp/amqpexchange/construct.xml b/reference/amqp/amqpexchange/construct.xml index 5ffdecc466..a516e16d97 100644 --- a/reference/amqp/amqpexchange/construct.xml +++ b/reference/amqp/amqpexchange/construct.xml @@ -11,14 +11,10 @@ &reftitle.description; public AMQPExchange::__construct - AMQPConnectionconnection - stringexchange_name"" + AMQPChannelamqp_channel - Returns a new instance of an AMQPExchange object, associated with the given AMQPConnection object. If the - exchange_name parameter is specified and the an exchange by that name exists on the - broker, an instance of that specific exchange will be returned. Otherwise, the exchange_name - is ignored. + Returns a new instance of an AMQPExchange object, associated with the given AMQPChannel object. @@ -28,18 +24,10 @@ - AMQPConnection + AMQPChannel - A valid AMQPConnection object, connected to a broker. - - - - - exchange_name - - - The name of an existing exchange to represent. + A valid AMQPChannel object, connected to a broker. @@ -57,8 +45,10 @@ &reftitle.errors; - Throws AMQPExchangeException when - connection is not connect to a broker. + Throws AMQPExchangeException when amqp_channel is not connected to a broker. + + + Throws AMQPConnectionException if the connection to the broker was lost. diff --git a/reference/amqp/amqpexchange/declare.xml b/reference/amqp/amqpexchange/declare.xml index 7dbea34447..5b8466ce37 100644 --- a/reference/amqp/amqpexchange/declare.xml +++ b/reference/amqp/amqpexchange/declare.xml @@ -10,51 +10,17 @@ &reftitle.description; - public boolAMQPExchange::declare - stringexchange_name"" - stringexchange_typeAMQP_EX_TYPE_DIRECT - intflags0 + public intAMQPExchange::declare + - Declare a new exchange on the broker with the given information. If an exchange by that name already exists and the - exchange_type and/or flags are specified, the exchange settings will - be updated. + Declare a new exchange on the broker. - - If no exchange_type is specified and the exchange does not exist, the exchange type will default to "direct". - - &reftitle.parameters; - - - exchange_name - - - The name of the exchange. - - - - - exchange_type - - - The type of the exchange. Can be any of AMQP_EX_TYPE_DIRECT, AMQP_EX_TYPE_FANOUT, AMQP_EX_TYPE_TOPIC or AMQP_EX_TYPE_HEADER. - - - - - flags - - - A bitmask of any of the flags: AMQP_PASSIVE, AMQP_DURABLE, AMQP_AUTODELETE. - - - - @@ -70,6 +36,12 @@ Throws AMQPExchangeException on failure. + + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. + @@ -85,8 +57,13 @@ $cnn = new AMQPConnection(); $cnn->connect(); -$ex = new AMQPExchange($cnn); -$ex->declare('new_topic_exchange', AMQP_EX_TYPE_DIRECT, AMQP_DURABLE | AMQP_AUTODELETE); +$ch = new AMQPChannel($cnn); + +$ex = new AMQPExchange($ch); +$ex->setName('new_topic_exchange'); +$ex->setType(AMQP_EX_TYPE_DIRECT); +$ex->setFlags(AMQP_DURABLE | AMQP_AUTODELETE); +$ex->declare(); ?> ]]> diff --git a/reference/amqp/amqpexchange/delete.xml b/reference/amqp/amqpexchange/delete.xml index 2bfa9f8f41..d08b58aa90 100644 --- a/reference/amqp/amqpexchange/delete.xml +++ b/reference/amqp/amqpexchange/delete.xml @@ -11,15 +11,11 @@ &reftitle.description; public boolAMQPExchange::delete - stringexchange_nameNULL - intparams0 + intflagsAMQP_NOPARAM Delete and exchange from the broker. - - &warn.undocumented.func; - @@ -27,17 +23,7 @@ - exchange_name - - - The name of the exchange to delete. If the AMQPExchange object is already bound to an existing exchange and then - exchange_name is not specified, the exchange bound to the AMQPExchange object will be - deleted. - - - - - params + flags Optionally AMQP_IFUNUSED can be specified to indicate the exchange @@ -49,6 +35,19 @@ + + &reftitle.errors; + + Throws AMQPExchangeException on failure. + + + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. + + + &reftitle.returnvalues; diff --git a/reference/amqp/amqpexchange/getargument.xml b/reference/amqp/amqpexchange/getargument.xml new file mode 100644 index 0000000000..9395dd96c2 --- /dev/null +++ b/reference/amqp/amqpexchange/getargument.xml @@ -0,0 +1,63 @@ + + + + + + AMQPExchange::getArgument + Get the argument associated with the given key + + + + &reftitle.description; + + public mixedAMQPExchange::getArgument + stringkey + + + Get the argument associated with the given key. + + + + + &reftitle.parameters; + + + key + + + The key to look up. + + + + + + + + &reftitle.returnvalues; + + The string or integer value associated with the given key, or &false; if the key is not set. + + + + + + diff --git a/reference/amqp/amqpexchange/getarguments.xml b/reference/amqp/amqpexchange/getarguments.xml new file mode 100644 index 0000000000..d40ad10d06 --- /dev/null +++ b/reference/amqp/amqpexchange/getarguments.xml @@ -0,0 +1,53 @@ + + + + + + AMQPExchange::getArguments + Get all arguments set on the given exchange + + + + &reftitle.description; + + public arrayAMQPExchange::getArguments + + + + Get all arguments as an array of key/value pairs that are currently set on the given exchange. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + An array containing all of the set key/value pairs. + + + + + diff --git a/reference/amqp/amqpexchange/getflags.xml b/reference/amqp/amqpexchange/getflags.xml new file mode 100644 index 0000000000..eca33feab0 --- /dev/null +++ b/reference/amqp/amqpexchange/getflags.xml @@ -0,0 +1,53 @@ + + + + + + AMQPExchange::getFlags + Get the flag bitmask + + + + &reftitle.description; + + public intAMQPExchange::getFlags + + + + Get all the flags currently set on the given exchange. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + An integer bitmask of all the flags currently set on this exchange object. + + + + + diff --git a/reference/amqp/amqpexchange/getname.xml b/reference/amqp/amqpexchange/getname.xml new file mode 100644 index 0000000000..f6d1134f16 --- /dev/null +++ b/reference/amqp/amqpexchange/getname.xml @@ -0,0 +1,55 @@ + + + + + + AMQPExchange::getName + Get the configured name + + + + &reftitle.description; + + public stringAMQPExchange::getName + + + + Get the configured name. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The configured name as a string. + + + + + + + diff --git a/reference/amqp/amqpexchange/gettype.xml b/reference/amqp/amqpexchange/gettype.xml new file mode 100644 index 0000000000..53ccedb6b2 --- /dev/null +++ b/reference/amqp/amqpexchange/gettype.xml @@ -0,0 +1,55 @@ + + + + + + AMQPExchange::getType + Get the configured type + + + + &reftitle.description; + + public stringAMQPExchange::getType + + + + Get the configured type. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The configured type as a string. + + + + + + + diff --git a/reference/amqp/amqpexchange/publish.xml b/reference/amqp/amqpexchange/publish.xml index 8701e3e663..ea99e7acf3 100644 --- a/reference/amqp/amqpexchange/publish.xml +++ b/reference/amqp/amqpexchange/publish.xml @@ -13,13 +13,12 @@ public boolAMQPExchange::publish stringmessage stringrouting_key - intparams0 - arrayattributes + intflagsAMQP_NOPARAM + arrayattributesarray() Publish a message to the exchange represented by the AMQPExchange object. - @@ -43,7 +42,7 @@ - params + flags One or more of AMQP_MANDATORY and @@ -143,6 +142,12 @@ Throws an AMQPExchangeException on failure. + + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. + diff --git a/reference/amqp/amqpexchange/setargument.xml b/reference/amqp/amqpexchange/setargument.xml new file mode 100644 index 0000000000..ab9bff87dd --- /dev/null +++ b/reference/amqp/amqpexchange/setargument.xml @@ -0,0 +1,73 @@ + + + + + + AMQPExchange::setArgument + Set the value for the given key + + + + &reftitle.description; + + public voidAMQPExchange::setArgument + stringkey + mixedvalue + + + Set the key to the given value. + + + + + &reftitle.parameters; + + + key + + + The key to set. + + + + + value + + + The value to set. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpexchange/setarguments.xml b/reference/amqp/amqpexchange/setarguments.xml new file mode 100644 index 0000000000..5d04aca079 --- /dev/null +++ b/reference/amqp/amqpexchange/setarguments.xml @@ -0,0 +1,64 @@ + + + + + + AMQPExchange::setArguments + Set all arguments on the exchange + + + + &reftitle.description; + + public voidAMQPExchange::setArguments + arrayarguments + + + Set all arguments on the given exchange. All other argument settings will be wiped. + + + + + &reftitle.parameters; + + + arguments + + + An array of key/value pairs of arguments. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpexchange/setflags.xml b/reference/amqp/amqpexchange/setflags.xml new file mode 100644 index 0000000000..7e1115a384 --- /dev/null +++ b/reference/amqp/amqpexchange/setflags.xml @@ -0,0 +1,64 @@ + + + + + + AMQPExchange::setFlags + Set the flags on an exchange + + + + &reftitle.description; + + public voidAMQPExchange::setFlags + intflags + + + Set the flags on an exchange. + + + + + &reftitle.parameters; + + + flags + + + A bitmask of flags. This call currently only considers the following flags: AMQP_PASSIVE, AMQP_PASSIVE. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpexchange/setname.xml b/reference/amqp/amqpexchange/setname.xml new file mode 100644 index 0000000000..fcc4ec542c --- /dev/null +++ b/reference/amqp/amqpexchange/setname.xml @@ -0,0 +1,65 @@ + + + + + + AMQPExchange::setName + Set the name of the exchange + + + + &reftitle.description; + + public voidAMQPExchange::setName + stringexchange_name + + + Set the name of the exchange. + + + + + + &reftitle.parameters; + + + exchange_name + + + The name of the exchange to set as string. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpexchange/settype.xml b/reference/amqp/amqpexchange/settype.xml new file mode 100644 index 0000000000..22f1ab7965 --- /dev/null +++ b/reference/amqp/amqpexchange/settype.xml @@ -0,0 +1,67 @@ + + + + + + AMQPExchange::setType + Set the type of the exchange + + + + &reftitle.description; + + public stringAMQPExchange::setType + stringexchange_type + + + Set the type of the exchange. This can be any of AMQP_EX_TYPE_DIRECT, AMQP_EX_TYPE_FANOUT, AMQP_EX_TYPE_HEADER or AMQP_EX_TYPE_TOPIC. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + exchange_type + + + The type of exchange as a string. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpqueue.xml b/reference/amqp/amqpqueue.xml index d2a1ca3606..183e753922 100644 --- a/reference/amqp/amqpqueue.xml +++ b/reference/amqp/amqpqueue.xml @@ -32,7 +32,7 @@ - Methods + &Methods; diff --git a/reference/amqp/amqpqueue/ack.xml b/reference/amqp/amqpqueue/ack.xml index b23560c6d8..653cb8cb42 100644 --- a/reference/amqp/amqpqueue/ack.xml +++ b/reference/amqp/amqpqueue/ack.xml @@ -12,10 +12,10 @@ public boolAMQPQueue::ack intdelivery_tag - intflagsNULL + intflagsAMQP_NOPARAM - This method allows the acknowledgement of a message that is retrieved with the AMQP_NOACK flag through + This method allows the acknowledgement of a message that is retrieved without the AMQP_AUTOACK flag through AMQPQueue::get or AMQPQueue::consume @@ -43,7 +43,17 @@ - + + + &reftitle.errors; + + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. + + + &reftitle.returnvalues; @@ -64,14 +74,16 @@ $connection = new AMQPConnection(); $connection->connect(); +$channel = new AMQPChannel($connection); + /* create a queue object */ -$queue = new AMQPQueue($connection); +$queue = new AMQPQueue($channel); //declare the queue $queue->declare('myqueue'); //get the next message, but don't mark it as delivered -$message = $queue->get(AMQP_NOACK); +$message = $queue->get(AMQP_NOPARAM); echo $message['msg']; diff --git a/reference/amqp/amqpqueue/bind.xml b/reference/amqp/amqpqueue/bind.xml index 0763e6e476..e458faa0e7 100644 --- a/reference/amqp/amqpqueue/bind.xml +++ b/reference/amqp/amqpqueue/bind.xml @@ -46,6 +46,16 @@ + + &reftitle.errors; + + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. + + + &reftitle.returnvalues; diff --git a/reference/amqp/amqpqueue/cancel.xml b/reference/amqp/amqpqueue/cancel.xml index 0473c9a743..49108f893c 100644 --- a/reference/amqp/amqpqueue/cancel.xml +++ b/reference/amqp/amqpqueue/cancel.xml @@ -16,9 +16,6 @@ Cancel a queue that is already bound to an exchange and routing key. - - &warn.undocumented.func; - @@ -37,6 +34,16 @@ + + &reftitle.errors; + + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. + + + &reftitle.returnvalues; diff --git a/reference/amqp/amqpqueue/construct.xml b/reference/amqp/amqpqueue/construct.xml index 747d35a697..631237cf29 100644 --- a/reference/amqp/amqpqueue/construct.xml +++ b/reference/amqp/amqpqueue/construct.xml @@ -4,7 +4,7 @@ AMQPQueue::__construct - Create an instance of an AMQPQueue object. + Create an instance of an AMQPQueue object @@ -12,7 +12,6 @@ public AMQPQueue::__construct AMQPConnectionamqp_connection - stringqueue_name"" Creates an AMQPQueue instance representing an AMQP queue on the broker. @@ -22,31 +21,23 @@ &reftitle.parameters; - - - amqp_connection - - - A valid AMQPConnection object. - - - - - queue_name - - - The name of the queue to construct. If no queue name is specified, the broker will generate one. - - - - + + + + + &reftitle.errors; + + Throws AMQPQueueException when amqp_channel is not connected to a broker. + + + Throws AMQPConnectionException if the connection to the broker was lost. &reftitle.returnvalues; - + Returns an instance of AMQPQueue on success. diff --git a/reference/amqp/amqpqueue/consume.xml b/reference/amqp/amqpqueue/consume.xml index 9b1d37ff1e..2ace757dbd 100644 --- a/reference/amqp/amqpqueue/consume.xml +++ b/reference/amqp/amqpqueue/consume.xml @@ -4,81 +4,100 @@ AMQPQueue::consume - The consume purpose + Consume messages from a queue - + &reftitle.description; - public arrayAMQPQueue::consume - arrayoptionsarray() + public voidAMQPQueue::consume + callbackcallback + intflagsAMQP_NOPARAM - This is a blocking function, in that the function will not return until the minimum number of of messages as specified by the min are read off of the queue. - To use a non-blocking function, see AMQPQueue::get. + Blocking function that will retrieve the next message from the queue as it becomes available and will pass it off to the callback. - + &reftitle.parameters; + + callback + + + A callback function to which the consumed message will be passed. The function must accept at a minimum one parameter, an AMQPEnvelope object, + and an optional second parameter the AMQPQueue from which the message was consumed. + + + The AMQPQueue::consume will not return the processing thread back to the PHP script until the callback function returns &false;. + + + - options + flags - options is a an array of consume options. The keys used in the options array are: min, max, and ack. All other keys will be ignored. - - - For each missing option, the extension will check the ini settings or use the default value. + A bitmask of any of the flags: AMQP_NOACK. - - - &reftitle.returnvalues; + + + &reftitle.errors; - An array containing the messages consumed. The number of returned messages will be at least the number given by min in the options array. But not more than the number given by max. + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. - + + + &reftitle.returnvalues; + + &reftitle.examples; <methodname>AMQPQueue::consume</methodname> example -connect(); + /* Create a connection using all default credentials: */ + $connection = new AMQPConnection(); + $connection->connect(); -/* create a queue object */ -$queue = new AMQPQueue($connection); + $channel = new AMQPChannel($connection); -//declare the queue -$queue->declare('myqueue'); + /* create a queue object */ + $queue = new AMQPQueue($channel); -$options = array( - 'min' => 1, - 'max' => 10, - 'ack' => true -); + //declare the queue + $queue->declare('myqueue'); -//get the messages -$messages = $queue->consume($options); + $i = 0; + function processMessage($envelope, $queue) { + global $i; + echo "Message $i: " . $envelope->getBody() . "\n"; + $i++; + if ($i > 10) { + // Bail after 10 messages + return false; + } + } -foreach ($messages as $message) { - echo $message['message_body']; -} + // Consume messages on queue + $queue->consume("processMessage"); -?> -]]> + ?> + ]]> diff --git a/reference/amqp/amqpqueue/declare.xml b/reference/amqp/amqpqueue/declare.xml index 49db42836c..c7fbc8d82c 100644 --- a/reference/amqp/amqpqueue/declare.xml +++ b/reference/amqp/amqpqueue/declare.xml @@ -11,8 +11,7 @@ &reftitle.description; public intAMQPQueue::declare - stringqueue_name"" - intflagsAMQP_AUTODELETE + Declare a new queue on the broker. @@ -22,24 +21,16 @@ &reftitle.parameters; - - - queue_name - - - The name of the queue to declare. - - - - - flags - - - A bitmask of any of the flags: AMQP_AUTODELETE, AMQP_PASSIVE, AMQP_DURABLE, AMQP_NOACK. - - - - + + + + + &reftitle.errors; + + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. diff --git a/reference/amqp/amqpqueue/delete.xml b/reference/amqp/amqpqueue/delete.xml index 4d7ade8e59..144a55633b 100644 --- a/reference/amqp/amqpqueue/delete.xml +++ b/reference/amqp/amqpqueue/delete.xml @@ -10,8 +10,8 @@ &reftitle.description; - public boolAMQPQueue::delete - stringqueue_name + publicboolAMQPQueue::delete + Delete a queue from the broker, including its entire contents of unread or unacknowledged messages. @@ -20,17 +20,16 @@ &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.errors; - - - queue_name - - - The name of the queue to delete. - - - - + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. diff --git a/reference/amqp/amqpqueue/get.xml b/reference/amqp/amqpqueue/get.xml index 1ddc2f28c5..2dcd8a0770 100644 --- a/reference/amqp/amqpqueue/get.xml +++ b/reference/amqp/amqpqueue/get.xml @@ -10,94 +10,92 @@ &reftitle.description; - public arrayAMQPQueue::get - intflagsAMQP_NOACK - - - Retrieve the next message from the queue. This is a non-blocking operation, which means that if there is no message on the queue, the function will return immediately with no message. - - + public mixedAMQPQueue::get + intflags + + + Retrieve the next available message from the queue. If no messages are present in the queue, this function will return &false; immediately. This is a non blocking alternative to the AMQPQueue::consume method. + + + Currently, the only supported flag for the flags parameter is AMQP_AUTOACK. If this flag is passed in, then the message returned will automatically be marked as acknowledged by the broker as soon as the frames are sent to the client. + + - - &reftitle.parameters; - - - - flags - - - A bitmask of any of the flags: AMQP_NOACK. - - - - - - + + &reftitle.parameters; + + + + flags + + + A bitmask of supported flags for the method call. Currently, the only the supported flag is AMQP_AUTOACK. If this value is not provided, it will use the value of amqp.auto_ack. + + + + + + - - &reftitle.returnvalues; - - Returns array possibly containing keys routing_key, - exchange, delivery_tag, - Content-type, Content-encoding, - type, timestamp, - priority, expiration, - user_id, app_id, - message_id, Reply-to, - count, msg. - - + + &reftitle.returnvalues; + + An instance of AMQPEnvelope representing the message pulled from the queue, or &false;. + + - - &reftitle.examples; - - - <methodname>AMQPQueue::get</methodname> example - - + &reftitle.examples; + + + <methodname>AMQPQueue::get</methodname> example + + connect(); + /* Create a connection using all default credentials: */ + $connection = new AMQPConnection(); + $connection->connect(); -/* create a queue object */ -$queue = new AMQPQueue($connection); + $channel = new AMQPChannel($connection); -//declare the queue -$queue->declare('myqueue'); + /* create a queue object */ + $queue = new AMQPQueue($channel); -//get the next message -$message = $queue->get(); + //declare the queue + $queue->declare('myqueue'); -echo $message['msg']; + //get the messages + $messages = $queue->get(AMQP_AUTOACK); -?> -]]> - - - - + echo $message->getBody(); - + ?> + ]]> + + + + - + + + diff --git a/reference/amqp/amqpqueue/getargument.xml b/reference/amqp/amqpqueue/getargument.xml new file mode 100644 index 0000000000..7743f90767 --- /dev/null +++ b/reference/amqp/amqpqueue/getargument.xml @@ -0,0 +1,64 @@ + + + + + + AMQPQueue::getArgument + Get the argument associated with the given key + + + + &reftitle.description; + + public mixedAMQPQueue::getArgument + stringkey + + + Get the argument associated with the given key. + + + + + &reftitle.parameters; + + + key + + + The key to look up. + + + + + + + + &reftitle.returnvalues; + + The string or integer value associated with the given key, or &false; if the key is not set. + + + + + + + diff --git a/reference/amqp/amqpqueue/getarguments.xml b/reference/amqp/amqpqueue/getarguments.xml new file mode 100644 index 0000000000..abf96792ef --- /dev/null +++ b/reference/amqp/amqpqueue/getarguments.xml @@ -0,0 +1,55 @@ + + + + + + AMQPQueue::getArguments + Get all arguments set on the given queue + + + + &reftitle.description; + + public arrayAMQPQueue::getArguments + + + + Get all arguments as an array of key/value pairs that are currently set on the given queue. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + An array containing all of the set key/value pairs. + + + + + + + diff --git a/reference/amqp/amqpqueue/getflags.xml b/reference/amqp/amqpqueue/getflags.xml new file mode 100644 index 0000000000..16dc77b561 --- /dev/null +++ b/reference/amqp/amqpqueue/getflags.xml @@ -0,0 +1,54 @@ + + + + + + AMQPQueue::getFlags + Get the flag bitmask + + + + &reftitle.description; + + public intAMQPQueue::getFlags + + + + Get all the flags currently set on the given queue. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + An integer bitmask of all the flags currently set on this exchange object. + + + + + diff --git a/reference/amqp/amqpqueue/getname.xml b/reference/amqp/amqpqueue/getname.xml new file mode 100644 index 0000000000..2d007f6d81 --- /dev/null +++ b/reference/amqp/amqpqueue/getname.xml @@ -0,0 +1,56 @@ + + + + + + AMQPQueue::getName + Get the configured name + + + + &reftitle.description; + + public stringAMQPQueue::getName + + + + Get the configured name. + + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + The configured name as a string. + + + + + + + diff --git a/reference/amqp/amqpqueue/nack.xml b/reference/amqp/amqpqueue/nack.xml new file mode 100644 index 0000000000..57a7c9f3eb --- /dev/null +++ b/reference/amqp/amqpqueue/nack.xml @@ -0,0 +1,89 @@ + + + + + + AMQPQueue::nack + Mark a message as explicitly not acknowledged. + + + + &reftitle.description; + + public voidAMQPQueue::nack + stringdelivery_tag + stringflagsAMQP_NOPARAM + + + Mark the message identified by delivery_tab as explicitly not acknowledged. This method can only be called on messages that have not yet been acknowledged, meaning that messages retrieved with by AMQPQueue::consume and AMQPQueue::get and using the AMQP_AUTOACK flag are not eligible. + + + When called, the broker will immediately put the message back onto the queue, instead of waiting until the connection is closed. + + + This method is only supported by the RabbitMQ broker. The behavior of calling this method while connected to any other broker is undefined. + + + + + &reftitle.parameters; + + + delivery_tag + + + The delivery tag by which to identify the message. + + + + + flags + + + A bitmask of flags. + + + + + + + + &reftitle.errors; + + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpqueue/purge.xml b/reference/amqp/amqpqueue/purge.xml index 0228961723..3baf193e7e 100644 --- a/reference/amqp/amqpqueue/purge.xml +++ b/reference/amqp/amqpqueue/purge.xml @@ -11,29 +11,25 @@ &reftitle.description; public boolAMQPQueue::purge - stringqueue_name + Purge the contents of a queue. - - &warn.undocumented.func; - &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.errors; - - - queue_name - - - The name of the queue to purge - - - - + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. diff --git a/reference/amqp/amqpqueue/setargument.xml b/reference/amqp/amqpqueue/setargument.xml new file mode 100644 index 0000000000..a29d4d14f0 --- /dev/null +++ b/reference/amqp/amqpqueue/setargument.xml @@ -0,0 +1,73 @@ + + + + + + AMQPQueue::setArgument + Set the value for the given key + + + + &reftitle.description; + + public voidAMQPQueue::setArgument + stringkey + mixedvalue + + + Set the key to the given value. + + + + + &reftitle.parameters; + + + key + + + The key to set. + + + + + value + + + The value to set. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpqueue/setarguments.xml b/reference/amqp/amqpqueue/setarguments.xml new file mode 100644 index 0000000000..9ed8ae5f0f --- /dev/null +++ b/reference/amqp/amqpqueue/setarguments.xml @@ -0,0 +1,64 @@ + + + + + + AMQPQueue::setArguments + Set all arguments on the queue + + + + &reftitle.description; + + public voidAMQPQueue::setArguments + arrayarguments + + + Set all arguments on the given queue. All other argument settings will be wiped. + + + + + &reftitle.parameters; + + + arguments + + + An array of key/value pairs of arguments. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpqueue/setflags.xml b/reference/amqp/amqpqueue/setflags.xml new file mode 100644 index 0000000000..629a2b0081 --- /dev/null +++ b/reference/amqp/amqpqueue/setflags.xml @@ -0,0 +1,64 @@ + + + + + + AMQPQueue::setFlags + Set the queue flags + + + + &reftitle.description; + + public voidAMQPQueue::setFlags + intflags + + + Set the flags on the queue. + + + + + &reftitle.parameters; + + + flags + + + A bitmask of flags. This call currently only supports a bitmask of the following flags: AMQP_DURABLE, AMQP_PASSIVE, AMQP_EXCLUSIVE, AMQP_AUTODELETE. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpqueue/setname.xml b/reference/amqp/amqpqueue/setname.xml new file mode 100644 index 0000000000..a10a6ca79b --- /dev/null +++ b/reference/amqp/amqpqueue/setname.xml @@ -0,0 +1,64 @@ + + + + + + AMQPQueue::setName + Set the queue name + + + + &reftitle.description; + + public voidAMQPQueue::setName + stringqueue_name + + + Set the name of the queue + + + + + &reftitle.parameters; + + + queue_name + + + The name of the queue as a string. + + + + + + + + &reftitle.returnvalues; + + &return.success; + + + + + + + diff --git a/reference/amqp/amqpqueue/unbind.xml b/reference/amqp/amqpqueue/unbind.xml index 271f190486..90b4c684ac 100644 --- a/reference/amqp/amqpqueue/unbind.xml +++ b/reference/amqp/amqpqueue/unbind.xml @@ -17,9 +17,6 @@ Remove a routing key binding on an exchange from the given queue. - - &warn.undocumented.func; - @@ -46,6 +43,16 @@ + + &reftitle.errors; + + Throws AMQPChannelException if the channel is not open. + + + Throws AMQPConnectionException if the connection to the broker was lost. + + + &reftitle.returnvalues; diff --git a/reference/amqp/book.developer.xml b/reference/amqp/book.developer.xml new file mode 100644 index 0000000000..b0df6d9220 --- /dev/null +++ b/reference/amqp/book.developer.xml @@ -0,0 +1,76 @@ + + + + + + + +%xhtml-lat1; +%xhtml-symbol; +%xhtml-special; +%isopub; + + + + + + +%language-defs.default; +%extensions.default; +%language-snippets.default; + + + + + + + + + +%global.entities; +%file.entities; +%frontpage.entities; +]> + + + AMQP + AMQP + + + &reftitle.intro; + + + + + + &reference.amqp.setup; + &reference.amqp.constants; + &reference.amqp.examples; + &reference.amqp.reference; + + + + + diff --git a/reference/amqp/book.xml b/reference/amqp/book.xml index bf7144337c..40f6588f1d 100644 --- a/reference/amqp/book.xml +++ b/reference/amqp/book.xml @@ -10,23 +10,29 @@ AMQP stands for Advanced Message Queue Protocol, which is an open standard middleware - layer for message routing and queuing. This extension is compatible with any Version 0-8 compatible AMQP + layer for message routing and queuing. This extension is compatible with any Version 0-9-1 compatible AMQP broker, such as RabbitMQ and OpenAMQ. This extension relies on the librabbitmq RPC library for - communicating with the AMQP broker. Though named "rabbit", this library is compatible with all Version 0-8 + communicating with the AMQP broker. Though named "rabbit", this library is compatible with all Version 0-9-1 compatible AMQP brokers. + + + We *HIGHLY* recommend you review the AMQP specification reference, version 0-9-1. This document will help explain a lot of the calls made available by this extension. + &reference.amqp.setup; &reference.amqp.constants; &reference.amqp.examples; &reference.amqp.amqpconnection; + &reference.amqp.amqpchannel; &reference.amqp.amqpexchange; &reference.amqp.amqpqueue; + &reference.amqp.amqpenvelope; diff --git a/reference/amqp/configure.xml b/reference/amqp/configure.xml index 9aab82f4da..bd9754186a 100644 --- a/reference/amqp/configure.xml +++ b/reference/amqp/configure.xml @@ -6,16 +6,18 @@ To install the AMQP PHP extension, you must first install the librabbitmq - library. Use the following steps to download and install the library: + library. You will need the 0-9-1 version of the rabbitmq-c client library, linked to the rabbitmq-codegen version that corresponds + to the version of the broker you are using. Use the following steps to download and install the library: diff --git a/reference/amqp/constants.xml b/reference/amqp/constants.xml index 495a6b88b9..9ea02c5c75 100644 --- a/reference/amqp/constants.xml +++ b/reference/amqp/constants.xml @@ -6,6 +6,17 @@ &extension.constants; + + + AMQP_NOPARAM + (integer) + + + + Passing in this constant as a flag will forcefully disable all other flags. Use this if you want to temporarily disable the amqp.auto_ack ini setting. + + + AMQP_DURABLE @@ -82,12 +93,12 @@ - AMQP_NOACK + AMQP_AUTOACK (integer) - When passed to the consumer method, the messages will not be marked as delivered. + When passed to the AMQPQueue::get and AMQPQueue::get methods as a flag, the messages will be immediately marked as acknowledged by the server upon delivery. @@ -143,11 +154,21 @@ - ? + If set during a call to AMQPQueue::ack, the delivery tag is treated as "up to and including", so that multiple messages can be acknowledged with a single method. If set to zero, the delivery tag refers to a single message. If the AMQP_MULTIPLE flag is set, and the delivery tag is zero, this indicates acknowledgement of all outstanding messages. + + AMQP_NOWAIT + (integer) + + + + If set during a call to AMQPExchange::bind, the server will not respond to the method. The client should not wait for a reply method. If the server could not complete the method it will raise a channel or connection exception. + + + AMQP_EX_TYPE_DIRECT (string) diff --git a/reference/amqp/examples.xml b/reference/amqp/examples.xml index 08e4c22f01..d122036dfc 100644 --- a/reference/amqp/examples.xml +++ b/reference/amqp/examples.xml @@ -13,12 +13,15 @@ $cnn = new AMQPConnection(); $cnn->connect(); +// Create a channel +$ch = new AMQPChannel($cnn); + // Declare a new exchange -$ex = new AMQPExchange($cnn); +$ex = new AMQPExchange($ch); $ex->declare('exchange1', AMQP_EX_TYPE_FANOUT); // Create a new queue -$q = new AMQPQueue($cnn); +$q = new AMQPQueue($ch); $q->declare('queue1'); // Bind it on the exchange to routing.key diff --git a/reference/amqp/ini.xml b/reference/amqp/ini.xml index 540f3d31f8..20fbf4c0c7 100644 --- a/reference/amqp/ini.xml +++ b/reference/amqp/ini.xml @@ -6,7 +6,7 @@ &extension.runtime; - Amqp &ConfigureOptions; + AMQP &ConfigureOptions; @@ -47,7 +47,31 @@ PHP_INI_ALL - + + amqp.auto_ack + 0 + PHP_INI_ALL + + + + amqp.min_messages + 0 + PHP_INI_ALL + + + + amqp.max_messages + 1 + PHP_INI_ALL + + + + amqp.prefetch_count + 3 + PHP_INI_ALL + + +
@@ -74,7 +98,7 @@
- The virtual host to which to connect on the host. + The virtual host on the broker to which to connect.
@@ -96,7 +120,7 @@ - The login (username) used for authenticating against the host. + The login to use while connecting to the broker. @@ -107,7 +131,51 @@ - The password used for authenticating against the host. + The password to use while connecting to the broker. + + + + + + amqp.auto_ack + integer + + + + Whether calls to AMQPQueue::get and AMQPQueue::consume should require that the client explicitly acknowledge messages. Setting this value to 1 will pass in the AMQP_AUTOACK flag to the above method calls if the flags field is omitted. + + + + + + amqp.min_messages + integer + + + + The minimum number of messages to require during a call to AMQPQueue::consume. + + + + + + amqp.max_messages + integer + + + + The maximum number of messages to require during a call to AMQPQueue::consume. + + + + + + amqp.prefetch_count + integer + + + + The number of messages to prefect from the server during a call to AMQPQueue::get or AMQPQueue::consume during which the AMQP_AUTOACK flag is not set. diff --git a/reference/amqp/reference.xml b/reference/amqp/reference.xml new file mode 100644 index 0000000000..6e1247e2a0 --- /dev/null +++ b/reference/amqp/reference.xml @@ -0,0 +1,32 @@ + + + + + AMQP &Functions; + + + Hello + + + + + diff --git a/reference/amqp/versions.xml b/reference/amqp/versions.xml index 1cef08db8d..bed5073832 100644 --- a/reference/amqp/versions.xml +++ b/reference/amqp/versions.xml @@ -8,16 +8,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + @@ -42,16 +80,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -62,6 +100,16 @@ + + + + + + + + + +