From 76909071ad626881aba6431737b204338619f622 Mon Sep 17 00:00:00 2001 From: Pieter de Zwart Date: Mon, 7 Jun 2010 06:56:48 +0000 Subject: [PATCH] Initial commit of AMQP documentation after preliminary approval from PHP Doc list. Part 1 of 2 part commit. Associated commit is of doc-base. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@300253 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/amqp/amqpconnection.xml | 67 ++++++ reference/amqp/amqpconnection/construct.xml | 98 ++++++++ reference/amqp/amqpconnection/isconnected.xml | 80 +++++++ reference/amqp/amqpconnectionexception.xml | 112 +++++++++ reference/amqp/amqpexception.xml | 112 +++++++++ reference/amqp/amqpexchange.xml | 67 ++++++ reference/amqp/amqpexchange/bind.xml | 77 +++++++ reference/amqp/amqpexchange/construct.xml | 78 +++++++ reference/amqp/amqpexchange/declare.xml | 112 +++++++++ reference/amqp/amqpexchange/delete.xml | 98 ++++++++ reference/amqp/amqpexchange/publish.xml | 77 +++++++ reference/amqp/amqpexchangeexception.xml | 112 +++++++++ reference/amqp/amqpqueue.xml | 67 ++++++ reference/amqp/amqpqueue/ack.xml | 69 ++++++ reference/amqp/amqpqueue/bind.xml | 77 +++++++ reference/amqp/amqpqueue/cancel.xml | 67 ++++++ reference/amqp/amqpqueue/construct.xml | 77 +++++++ reference/amqp/amqpqueue/consume.xml | 77 +++++++ reference/amqp/amqpqueue/declare.xml | 74 ++++++ reference/amqp/amqpqueue/delete.xml | 65 ++++++ reference/amqp/amqpqueue/get.xml | 65 ++++++ reference/amqp/amqpqueue/purge.xml | 68 ++++++ reference/amqp/amqpqueue/unbind.xml | 77 +++++++ reference/amqp/amqpqueueexception.xml | 112 +++++++++ reference/amqp/book.xml | 52 +++++ reference/amqp/configure.xml | 55 +++++ reference/amqp/constants.xml | 217 ++++++++++++++++++ reference/amqp/examples.xml | 57 +++++ reference/amqp/ini.xml | 138 +++++++++++ reference/amqp/setup.xml | 44 ++++ reference/amqp/versions.xml | 86 +++++++ 31 files changed, 2634 insertions(+) create mode 100644 reference/amqp/amqpconnection.xml create mode 100644 reference/amqp/amqpconnection/construct.xml create mode 100644 reference/amqp/amqpconnection/isconnected.xml create mode 100644 reference/amqp/amqpconnectionexception.xml create mode 100644 reference/amqp/amqpexception.xml create mode 100644 reference/amqp/amqpexchange.xml create mode 100644 reference/amqp/amqpexchange/bind.xml create mode 100644 reference/amqp/amqpexchange/construct.xml create mode 100644 reference/amqp/amqpexchange/declare.xml create mode 100644 reference/amqp/amqpexchange/delete.xml create mode 100644 reference/amqp/amqpexchange/publish.xml create mode 100644 reference/amqp/amqpexchangeexception.xml create mode 100644 reference/amqp/amqpqueue.xml create mode 100644 reference/amqp/amqpqueue/ack.xml create mode 100644 reference/amqp/amqpqueue/bind.xml create mode 100644 reference/amqp/amqpqueue/cancel.xml create mode 100644 reference/amqp/amqpqueue/construct.xml create mode 100644 reference/amqp/amqpqueue/consume.xml create mode 100644 reference/amqp/amqpqueue/declare.xml create mode 100644 reference/amqp/amqpqueue/delete.xml create mode 100644 reference/amqp/amqpqueue/get.xml create mode 100644 reference/amqp/amqpqueue/purge.xml create mode 100644 reference/amqp/amqpqueue/unbind.xml create mode 100644 reference/amqp/amqpqueueexception.xml create mode 100644 reference/amqp/book.xml create mode 100644 reference/amqp/configure.xml create mode 100644 reference/amqp/constants.xml create mode 100644 reference/amqp/examples.xml create mode 100644 reference/amqp/ini.xml create mode 100644 reference/amqp/setup.xml create mode 100644 reference/amqp/versions.xml diff --git a/reference/amqp/amqpconnection.xml b/reference/amqp/amqpconnection.xml new file mode 100644 index 0000000000..d17b3680c0 --- /dev/null +++ b/reference/amqp/amqpconnection.xml @@ -0,0 +1,67 @@ + + + + + + The AMQPConnection class + AMQPConnection + + + + +
+ &reftitle.intro; + + Represents a connection to an AMQP broker. + +
+ + +
+ &reftitle.classsynopsis; + + + + AMQPConnection + + + + + AMQPConnection + + + + + Methods + + + + +
+ +
+ + &reference.amqp.entities.amqpconnection; + +
+ + diff --git a/reference/amqp/amqpconnection/construct.xml b/reference/amqp/amqpconnection/construct.xml new file mode 100644 index 0000000000..e8ea7a5aa2 --- /dev/null +++ b/reference/amqp/amqpconnection/construct.xml @@ -0,0 +1,98 @@ + + + + + + AMQPConnection::__construct + Create an instance of AMQPConnection + + + + &reftitle.description; + + AMQPConnection::__construct + arraycredentialsarray() + + + Creates an AMQPConnection instance representing a connection to an AMQP broker. + + + + + &reftitle.parameters; + + + + credentials + + + The credentials is an optional array of credential information for connecting to the AMQP + broker. The keys used in the credentials array are: host, port, vhost, login and password. + All other keys will be ignored. + + + For each missing credential, the extension will check the ini settings or use the default value. + + + + + + + + + &reftitle.returnvalues; + + An AMQPConnection object. + + + + + &reftitle.examples; + + + <function>AMQPConnection::__construct</function> example + + 'example.host', + 'vhost' => '/', + 'port' => 5763, + 'login' => 'user', + 'password' => 'password' +)); + +?> +]]> + + + + + + + + + diff --git a/reference/amqp/amqpconnection/isconnected.xml b/reference/amqp/amqpconnection/isconnected.xml new file mode 100644 index 0000000000..8050b1e1b9 --- /dev/null +++ b/reference/amqp/amqpconnection/isconnected.xml @@ -0,0 +1,80 @@ + + + + + + AMQPConnection::isConnected + Determine if the AMQPConnection object is still connected to the broker. + + + + &reftitle.description; + + public voidAMQPConnection::isConnected + + + + This method will check whether the connection to the AMQP broker is still valid. It does so by checking + the return status of the last command. + + + + + &reftitle.parameters; + &no.function.parameters; + + + + &reftitle.returnvalues; + + + + + + + &reftitle.examples; + + + <function>AMQPConnection::isConnected</function> example + +isConnected()) { + die('The connection to the server was not established.'); +} + +?> +]]> + + + + + + + + + diff --git a/reference/amqp/amqpconnectionexception.xml b/reference/amqp/amqpconnectionexception.xml new file mode 100644 index 0000000000..a245abc850 --- /dev/null +++ b/reference/amqp/amqpconnectionexception.xml @@ -0,0 +1,112 @@ + + + + + + The AMQPConnectionException class + AMQPConnectionException + + + + +
+ &reftitle.intro; + + + +
+ + +
+ &reftitle.classsynopsis; + + + + AMQPConnectionException + + + + + AMQPConnectionException + + + + extends + AMQPException + + + + Properties + + + Methods + + + Inherited methods + + + + + +
+ + + +
+ &reftitle.properties; + + + message + + + + + + code + + + + + + file + + + + + + line + + + + + +
+ + + +
+ + &reference.amqp.entities.amqpconnectionexception; + +
+ + diff --git a/reference/amqp/amqpexception.xml b/reference/amqp/amqpexception.xml new file mode 100644 index 0000000000..4705f066b5 --- /dev/null +++ b/reference/amqp/amqpexception.xml @@ -0,0 +1,112 @@ + + + + + + The AMQPException class + AMQPException + + + + +
+ &reftitle.intro; + + + +
+ + +
+ &reftitle.classsynopsis; + + + + AMQPException + + + + + AMQPException + + + + extends + Exception + + + + Properties + + + Methods + + + Inherited methods + + + + + +
+ + + +
+ &reftitle.properties; + + + message + + + + + + code + + + + + + file + + + + + + line + + + + + +
+ + + +
+ + &reference.amqp.entities.amqpexception; + +
+ + diff --git a/reference/amqp/amqpexchange.xml b/reference/amqp/amqpexchange.xml new file mode 100644 index 0000000000..44b7204180 --- /dev/null +++ b/reference/amqp/amqpexchange.xml @@ -0,0 +1,67 @@ + + + + + + The AMQPExchange class + AMQPExchange + + + + +
+ &reftitle.intro; + + Represents an AMQP exchange. + +
+ + +
+ &reftitle.classsynopsis; + + + + AMQPExchange + + + + + AMQPExchange + + + + + Methods + + + + +
+ +
+ + &reference.amqp.entities.amqpexchange; + +
+ + diff --git a/reference/amqp/amqpexchange/bind.xml b/reference/amqp/amqpexchange/bind.xml new file mode 100644 index 0000000000..45d8e73ee3 --- /dev/null +++ b/reference/amqp/amqpexchange/bind.xml @@ -0,0 +1,77 @@ + + + + + + AMQPExchange::bind + The bind purpose + + + + &reftitle.description; + + public voidAMQPExchange::bind + stringqueue_name + stringrouting_key"" + + + + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + queue_name + + + The name of the queue to which to bind. + + + + + routing_key + + + The routing key to use as a binding. + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpexchange/construct.xml b/reference/amqp/amqpexchange/construct.xml new file mode 100644 index 0000000000..ca1d1f3612 --- /dev/null +++ b/reference/amqp/amqpexchange/construct.xml @@ -0,0 +1,78 @@ + + + + + + AMQPExchange::__construct + Create an instance of AMQPExchange + + + + &reftitle.description; + + AMQPExchange::__construct + AMQPConnectionconnection + stringexchange_name"" + + + 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. + + + + + + &reftitle.parameters; + + + + AMQPConnection + + + A valid AMQPConnection object, connected to a broker. + + + + + exchange_name + + + The name of an existing exchange to represent. + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpexchange/declare.xml b/reference/amqp/amqpexchange/declare.xml new file mode 100644 index 0000000000..82d6373c24 --- /dev/null +++ b/reference/amqp/amqpexchange/declare.xml @@ -0,0 +1,112 @@ + + + + + + AMQPExchange::declare + Declare a new exchange on the broker. + + + + &reftitle.description; + + public voidAMQPExchange::declare + stringexchange_name"" + stringexchange_typeAMQP_EX_TYPE_DIRECT + stringflagsNULL + + + 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. + + + 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. + + + + + + + + + &reftitle.returnvalues; + + + + + + + &reftitle.examples; + + + <function>AMQPExchange::declare</function> example + +declare('new_topic_exchange', AMQP_DURABLE | AMQP_AUTODELETE); + +?> +]]> + + + + + + + + + diff --git a/reference/amqp/amqpexchange/delete.xml b/reference/amqp/amqpexchange/delete.xml new file mode 100644 index 0000000000..23f12bdcee --- /dev/null +++ b/reference/amqp/amqpexchange/delete.xml @@ -0,0 +1,98 @@ + + + + + + AMQPExchange::delete + Delete the exchange from the broker. + + + + &reftitle.description; + + public voidAMQPExchange::delete + stringexchange_nameNULL + + + Delete and exchange from the broker. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + 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. + + + + + + + + + &reftitle.returnvalues; + + + + + + + &reftitle.examples; + + + <function>AMQPExchange::delete</function> example + +declare('new_topic_exchange', AMQP_DURABLE | AMQP_AUTODELETE); + +/* Delete the previous exchange */ +$ex2 = new AMQPExchange($cnn); +$ex2->delete('new_topic_exchange'); + +?> +]]> + + + + + + + + + diff --git a/reference/amqp/amqpexchange/publish.xml b/reference/amqp/amqpexchange/publish.xml new file mode 100644 index 0000000000..0a5dbd088e --- /dev/null +++ b/reference/amqp/amqpexchange/publish.xml @@ -0,0 +1,77 @@ + + + + + + AMQPExchange::publish + Publish a message to an exchange. + + + + &reftitle.description; + + public voidAMQPExchange::publish + stringmessage + stringrouting_key + + + Publish a message to the exchange represented by the AMQPExchange object. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + message + + + The message to publish. + + + + + routing_key + + + The routing key to which to publish. + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpexchangeexception.xml b/reference/amqp/amqpexchangeexception.xml new file mode 100644 index 0000000000..f5d1cbb37b --- /dev/null +++ b/reference/amqp/amqpexchangeexception.xml @@ -0,0 +1,112 @@ + + + + + + The AMQPExchangeException class + AMQPExchangeException + + + + +
+ &reftitle.intro; + + + +
+ + +
+ &reftitle.classsynopsis; + + + + AMQPExchangeException + + + + + AMQPExchangeException + + + + extends + AMQPException + + + + Properties + + + Methods + + + Inherited methods + + + + + +
+ + + +
+ &reftitle.properties; + + + message + + + + + + code + + + + + + file + + + + + + line + + + + + +
+ + + +
+ + &reference.amqp.entities.amqpexchangeexception; + +
+ + diff --git a/reference/amqp/amqpqueue.xml b/reference/amqp/amqpqueue.xml new file mode 100644 index 0000000000..d2a1ca3606 --- /dev/null +++ b/reference/amqp/amqpqueue.xml @@ -0,0 +1,67 @@ + + + + + + The AMQPQueue class + AMQPQueue + + + + +
+ &reftitle.intro; + + Represents an AMQP queue. + +
+ + +
+ &reftitle.classsynopsis; + + + + AMQPQueue + + + + + AMQPQueue + + + + + Methods + + + + +
+ +
+ + &reference.amqp.entities.amqpqueue; + +
+ + diff --git a/reference/amqp/amqpqueue/ack.xml b/reference/amqp/amqpqueue/ack.xml new file mode 100644 index 0000000000..0266a53a94 --- /dev/null +++ b/reference/amqp/amqpqueue/ack.xml @@ -0,0 +1,69 @@ + + + + + + AMQPQueue::ack + Acknowledge the receipt of a message + + + + &reftitle.description; + + public voidAMQPQueue::ack + stringexchange_name + stringrouting_key"" + + + This method allows the acknowledgement of a message that is retrieved with the AMQP_NOACK flag through + AMQPQueue::get or AMQPQueue::consume + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + delivery_tag + + + The message delivery tag of which to acknowledge receipt. + + + + + + + + + &reftitle.returnvalues; + + + + + + + diff --git a/reference/amqp/amqpqueue/bind.xml b/reference/amqp/amqpqueue/bind.xml new file mode 100644 index 0000000000..79bd3f9a66 --- /dev/null +++ b/reference/amqp/amqpqueue/bind.xml @@ -0,0 +1,77 @@ + + + + + + AMQPQueue::bind + Bind the given queue to a routing key on an exchange. + + + + &reftitle.description; + + public voidAMQPQueue::bind + stringexchange_name + stringrouting_key"" + + + The bind method will bind the given queue to the specified routing key on the given exchange. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + exchange_name + + + The exchange name on which to bind. + + + + + routing_key + + + The routing key to which to bind. + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpqueue/cancel.xml b/reference/amqp/amqpqueue/cancel.xml new file mode 100644 index 0000000000..4ebe4c788f --- /dev/null +++ b/reference/amqp/amqpqueue/cancel.xml @@ -0,0 +1,67 @@ + + + + + + AMQPQueue::cancel + Cancel a queue binding. + + + + &reftitle.description; + + public voidAMQPQueue::cancel + stringconsumer_tag + + + Cancel a queue that is already bound to an exchange and routing key. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + consumer_tag + + + The queue name to cancel, if the queue object is not already representative of a queue. + + + + + + + + + &reftitle.returnvalues; + + + + + + + diff --git a/reference/amqp/amqpqueue/construct.xml b/reference/amqp/amqpqueue/construct.xml new file mode 100644 index 0000000000..5c4da01a0b --- /dev/null +++ b/reference/amqp/amqpqueue/construct.xml @@ -0,0 +1,77 @@ + + + + + + AMQPQueue::__construct + Create an instance of an AMQPQueue object. + + + + &reftitle.description; + + AMQPQueue::__construct + stringamqp_connection + stringqueue_name"" + + + + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + amqp_connection + + + A valid AMQPConnection object. + + + + + queue_name + + + The name of the queue to construct. + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpqueue/consume.xml b/reference/amqp/amqpqueue/consume.xml new file mode 100644 index 0000000000..bffff1e5be --- /dev/null +++ b/reference/amqp/amqpqueue/consume.xml @@ -0,0 +1,77 @@ + + + + + + AMQPQueue::consume + The consume purpose + + + + &reftitle.description; + + public voidAMQPQueue::consume + stringnum_messages + stringflagsNULL + + + + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + num_messages + + + + + + + + flags + + + + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpqueue/declare.xml b/reference/amqp/amqpqueue/declare.xml new file mode 100644 index 0000000000..f6af7af1ca --- /dev/null +++ b/reference/amqp/amqpqueue/declare.xml @@ -0,0 +1,74 @@ + + + + + + AMQPQueue::declare + Declare a new queue + + + + &reftitle.description; + + public voidAMQPQueue::declare + stringqueue_name + stringflagsNULL + + + Declare a new queue. + + + + + &reftitle.parameters; + + + + queue_name + + + The name of the queue to declare. + + + + + flags + + + A bitmask of any of the flags: AMQP_NOACK. + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpqueue/delete.xml b/reference/amqp/amqpqueue/delete.xml new file mode 100644 index 0000000000..1fe3366e67 --- /dev/null +++ b/reference/amqp/amqpqueue/delete.xml @@ -0,0 +1,65 @@ + + + + + + AMQPQueue::delete + Delete a queue and its contents. + + + + &reftitle.description; + + public voidAMQPQueue::delete + stringqueue_name + + + Delete a queue from the broker, including its entire contents of unread or unacknowledged messages. + + + + + &reftitle.parameters; + + + + queue_name + + + The name of the queue to delete. + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpqueue/get.xml b/reference/amqp/amqpqueue/get.xml new file mode 100644 index 0000000000..65c4ff1602 --- /dev/null +++ b/reference/amqp/amqpqueue/get.xml @@ -0,0 +1,65 @@ + + + + + + AMQPQueue::get + Retrieve the next message from the queue. + + + + &reftitle.description; + + public voidAMQPQueue::get + stringflags + + + Retrieve the next message from the queue. + + + + + &reftitle.parameters; + + + + flags + + + A bitmask of any of the flags: AMQP_NOACK. + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpqueue/purge.xml b/reference/amqp/amqpqueue/purge.xml new file mode 100644 index 0000000000..53937c6f99 --- /dev/null +++ b/reference/amqp/amqpqueue/purge.xml @@ -0,0 +1,68 @@ + + + + + + AMQPQueue::purge + Purge the contents of a queue + + + + &reftitle.description; + + public voidAMQPQueue::purge + stringqueue_name + + + Purge the contents of a queue. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + queue_name + + + The name of the queue to purge + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpqueue/unbind.xml b/reference/amqp/amqpqueue/unbind.xml new file mode 100644 index 0000000000..266238704f --- /dev/null +++ b/reference/amqp/amqpqueue/unbind.xml @@ -0,0 +1,77 @@ + + + + + + AMQPQueue::unbind + Unbind the queue from a routing key. + + + + &reftitle.description; + + public voidAMQPQueue::unbind + stringexchange_name + stringrouting_key"" + + + Remove a routing key binding on an exchange from the given queue. + + + &warn.undocumented.func; + + + + + &reftitle.parameters; + + + + exchange_name + + + The name of the exchange on which the queue is bound. + + + + + routing_key + + + The binding routing key used by the queue. + + + + + + + + + &reftitle.returnvalues; + + + + + + + + diff --git a/reference/amqp/amqpqueueexception.xml b/reference/amqp/amqpqueueexception.xml new file mode 100644 index 0000000000..10d07effcb --- /dev/null +++ b/reference/amqp/amqpqueueexception.xml @@ -0,0 +1,112 @@ + + + + + + The AMQPQueueException class + AMQPQueueException + + + + +
+ &reftitle.intro; + + + +
+ + +
+ &reftitle.classsynopsis; + + + + AMQPQueueException + + + + + AMQPQueueException + + + + extends + AMQPException + + + + Properties + + + Methods + + + Inherited methods + + + + + +
+ + + +
+ &reftitle.properties; + + + message + + + + + + code + + + + + + file + + + + + + line + + + + + +
+ + + +
+ + &reference.amqp.entities.amqpqueueexception; + +
+ + diff --git a/reference/amqp/book.xml b/reference/amqp/book.xml new file mode 100644 index 0000000000..bf7144337c --- /dev/null +++ b/reference/amqp/book.xml @@ -0,0 +1,52 @@ + + + + + AMQP + AMQP + + + &reftitle.intro; + + 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 + 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 + compatible AMQP brokers. + + + + &reference.amqp.setup; + &reference.amqp.constants; + &reference.amqp.examples; + &reference.amqp.amqpconnection; + &reference.amqp.amqpexchange; + &reference.amqp.amqpqueue; + + + + diff --git a/reference/amqp/configure.xml b/reference/amqp/configure.xml new file mode 100644 index 0000000000..627470c797 --- /dev/null +++ b/reference/amqp/configure.xml @@ -0,0 +1,55 @@ + + + +
+ &reftitle.install; + + + + To install the AMQP PHP extension, you must first install the librabbitmq + library. Use the following steps to download and install the library: + + + + + + + download and compile the amqp.so file and add + an extension entry in your php.ini configuration file. + + + + Note to Win32 users: This extension does not currently support win32 since the librabbitmq library does not yet support Win32. + + +
+ + + diff --git a/reference/amqp/constants.xml b/reference/amqp/constants.xml new file mode 100644 index 0000000000..495a6b88b9 --- /dev/null +++ b/reference/amqp/constants.xml @@ -0,0 +1,217 @@ + + + + + &reftitle.constants; + &extension.constants; + + + + + AMQP_DURABLE + (integer) + + + + Durable exchanges and queues will survive a broker restart, complete with all of their data. + + + + + + AMQP_PASSIVE + (integer) + + + + Passive exchanges are queues will not be redeclared, but the broker will throw an error if the exchange or queue does not exist. + + + + + + AMQP_EXCLUSIVE + (integer) + + + + Valid for queues only, this flag indicates that only one client can be listening to and consuming from this queue. + + + + + + AMQP_AUTODELETE + (integer) + + + + For exchanges, the auto delete flag indicates that the exchange will be deleted as soon as no more queues are bound to it. + If no queues were ever bound the exchange, the exchange will never be deleted. + + + For queues, the auto delete flag indicates that the queue will be deleted as soon as there are no more listeners subscribed to it. + If no subscription has ever been active, the queue will never be deleted. + + + Note: Exclusive queues will always be automatically deleted with the client disconnects. + + + + + + AMQP_INTERNAL + (integer) + + + + Clients are not allowed to make specific queue bindings to exchanges defined with this flag. + + + + + + AMQP_NOLOCAL + (integer) + + + + When passed to the consume method for a clustered environment, do not consume from the local node. + + + + + + AMQP_NOACK + (integer) + + + + When passed to the consumer method, the messages will not be marked as delivered. + + + + + + AMQP_IFEMPTY + (integer) + + + + Passed on queue creation, this flag indicates that the queue should be deleted if it becomes empty. + + + + + + AMQP_IFUNUSED + (integer) + + + + Passed on queue or exchange creation, this flag indicates that the queue or exchange should be deleted when no clients are connected + to the given queue or exchange. + + + + + + AMQP_MANDATORY + (integer) + + + + When publishing a message, the message must be routed to a valid queue. If it is not, an error will be returned. + + + + + + AMQP_IMMEDIATE + (integer) + + + + When publishing a message, mark this message for immediate processing by the broker. (High priority message.) + + + + + + AMQP_MULTIPLE + (integer) + + + + ? + + + + + + AMQP_EX_TYPE_DIRECT + (string) + + + + A direct exchange type. + + + + + + AMQP_EX_TYPE_FANOUT + (string) + + + + A fanout exchange type. + + + + + + AMQP_EX_TYPE_TOPIC + (string) + + + + A topic exchange type. + + + + + + AMQP_EX_TYPE_HEADER + (string) + + + + A header exchange type. + + + + + + + + diff --git a/reference/amqp/examples.xml b/reference/amqp/examples.xml new file mode 100644 index 0000000000..f9ede033b1 --- /dev/null +++ b/reference/amqp/examples.xml @@ -0,0 +1,57 @@ + + + + + &reftitle.examples; + + AMQP Example + +declare('exchange1', AMQP_EX_TYPE_FANOUT); + +// Create a new queue +$q = new AMQPQueue($cnn, 'queue1'); +$q->declare(); + +// Bind it on the exchange to routing.key +$ex->bind('queue1', 'routing.key'); + +// Publish a message to the exchange with a routing key +$ex->publish('message', 'routing.key'); + +// Read from the queue +$msg = $queue->consume(1); + +?> +]]> + + + + + diff --git a/reference/amqp/ini.xml b/reference/amqp/ini.xml new file mode 100644 index 0000000000..70a24876f8 --- /dev/null +++ b/reference/amqp/ini.xml @@ -0,0 +1,138 @@ + + + +
+ &reftitle.runtime; + &extension.runtime; + + + Amqp &ConfigureOptions; + + + + &Name; + &Default; + &Changeable; + &Changelog; + + + + + amqp.host + localhost + PHP_INI_ALL + + + + amqp.vhost + / + PHP_INI_ALL + + + + amqp.port + 5672 + PHP_INI_ALL + + + + amqp.login + guest + PHP_INI_ALL + + + + amqp.password + guest + PHP_INI_ALL + + + + +
+
+ + &ini.descriptions.title; + + + + + + amqp.host + string + + + + The host to which to connect. + + + + + + amqp.vhost + string + + + + The virtual host to which to connect on the host. + + + + + + amqp.port + integer + + + + The port on which to connect. + + + + + + amqp.login + string + + + + The login (username) used for authenticating against the host. + + + + + + amqp.password + string + + + + The password used for authenticating against the host. + + + + + + +
+ + diff --git a/reference/amqp/setup.xml b/reference/amqp/setup.xml new file mode 100644 index 0000000000..ce91ba8938 --- /dev/null +++ b/reference/amqp/setup.xml @@ -0,0 +1,44 @@ + + + + + &reftitle.setup; + +
+ &reftitle.required; + + This extension requires librabbitmq client library. + +
+ + &reference.amqp.configure; + + &reference.amqp.ini; + +
+ &reftitle.resources; + &no.resource; +
+ +
+ + diff --git a/reference/amqp/versions.xml b/reference/amqp/versions.xml new file mode 100644 index 0000000000..1cef08db8d --- /dev/null +++ b/reference/amqp/versions.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +