Method | Description | |
---|---|---|
__construct ( AMQPChannel $amqp_channel ) | Create an instance of AMQPExchange. | |
bind ( string $exchange_name, string $routing_key = '', array $arguments = [] ) : boolean | Bind to another exchange. | |
declareExchange ( ) : boolean | Declare a new exchange on the broker. | |
delete ( string $exchangeName = null, integer $flags = AMQP_NOPARAM ) : boolean | Delete the exchange from the broker. | |
getArgument ( string $key ) : string | integer | boolean | Get the argument associated with the given key. | |
getArguments ( ) : array | Get all arguments set on the given exchange. | |
getChannel ( ) : AMQPChannel | Get the AMQPChannel object in use | |
getConnection ( ) : AMQPConnection | Get the AMQPConnection object in use | |
getFlags ( ) : integer | Get all the flags currently set on the given exchange. | |
getName ( ) : string | Get the configured name. | |
getType ( ) : string | Get the configured type. | |
hasArgument ( string $key ) : boolean | Check whether argument associated with the given key exists. | |
publish ( string $message, string $routing_key = null, integer $flags = AMQP_NOPARAM, array $attributes = [] ) : boolean | Publish a message to an exchange. | |
setArgument ( string $key, string | integer $value ) : boolean | Set the value for the given key. | |
setArguments ( array $arguments ) : boolean | Set all arguments on the exchange. | |
setFlags ( integer $flags ) : void | Set the flags on an exchange. | |
setName ( string $exchange_name ) : void | Set the name of the exchange. | |
setType ( string $exchange_type ) : void | Set the type of the exchange. | |
unbind ( string $exchange_name, string $routing_key = '', array $arguments = [] ) : boolean | Remove binding to another exchange. |
public __construct ( AMQPChannel $amqp_channel ) | ||
$amqp_channel | AMQPChannel | A valid AMQPChannel object, connected to a broker. |
public bind ( string $exchange_name, string $routing_key = '', array $arguments = [] ) : boolean | ||
$exchange_name | string | Name of the exchange to bind. |
$routing_key | string | The routing key to use for binding. |
$arguments | array | Additional binding arguments. |
return | boolean | true on success or false on failure. |
public declareExchange ( ) : boolean | ||
return | boolean | TRUE on success or FALSE on failure. |
public delete ( string $exchangeName = null, integer $flags = AMQP_NOPARAM ) : boolean | ||
$exchangeName | string | Optional name of exchange to delete. |
$flags | integer | Optionally AMQP_IFUNUSED can be specified to indicate the exchange should not be deleted until no clients are connected to it. |
return | boolean | true on success or false on failure. |
public getArguments ( ) : array | ||
return | array | An array containing all of the set key/value pairs. |
public getChannel ( ) : AMQPChannel | ||
return | AMQPChannel |
public getConnection ( ) : AMQPConnection | ||
return | AMQPConnection |
public hasArgument ( string $key ) : boolean | ||
$key | string | The key to look up. |
return | boolean |
public publish ( string $message, string $routing_key = null, integer $flags = AMQP_NOPARAM, array $attributes = [] ) : boolean | ||
$message | string | The message to publish. |
$routing_key | string | The optional routing key to which to publish to. |
$flags | integer | One or more of AMQP_MANDATORY and AMQP_IMMEDIATE. |
$attributes | array | One of content_type, content_encoding, message_id, user_id, app_id, delivery_mode, priority, timestamp, expiration, type or reply_to, headers. |
return | boolean | TRUE on success or FALSE on failure. |
public setArguments ( array $arguments ) : boolean | ||
$arguments | array | An array of key/value pairs of arguments. |
return | boolean | TRUE on success or FALSE on failure. |
public unbind ( string $exchange_name, string $routing_key = '', array $arguments = [] ) : boolean | ||
$exchange_name | string | Name of the exchange to bind. |
$routing_key | string | The routing key to use for binding. |
$arguments | array | Additional binding arguments. |
return | boolean | true on success or false on failure. |