AMQPExchange
class AMQPExchange (View source)
stub class representing AMQPExchange from pecl-amqp
Methods
Bind to another exchange.
Remove binding to another exchange.
Declare a new exchange on the broker.
Declare a new exchange on the broker.
Delete the exchange from the broker.
Get the argument associated with the given key.
Check whether argument associated with the given key exists.
Get all arguments set on the given exchange.
Get all the flags currently set on the given exchange.
Get the configured name.
Get the configured type.
Publish a message to an exchange.
Set the value for the given key.
Set the value for the given key.
Set all arguments on the exchange.
Set the flags on an exchange.
Set the name of the exchange.
Set the type of the exchange.
Get the AMQPChannel object in use
Get the AMQPConnection object in use
Details
__construct(AMQPChannel $channel)
Create an instance of AMQPExchange.
Returns a new instance of an AMQPExchange object, associated with the given AMQPChannel object.
void
bind(string $exchangeName, string $routingKey = '', array $arguments = [])
Bind to another exchange.
Bind an exchange to another exchange using the specified routing key.
void
unbind(string $exchangeName, string $routingKey = '', array $arguments = [])
Remove binding to another exchange.
Remove a routing key binding on an another exchange from the given exchange.
void
declareExchange()
Declare a new exchange on the broker.
void
declare()
Declare a new exchange on the broker.
void
delete(string $exchangeName = null, int $flags = AMQP_NOPARAM)
Delete the exchange from the broker.
bool|int|float|string|null
getArgument(string $argumentName)
Get the argument associated with the given key.
Get the argument associated with the given key.
bool
hasArgument(string $argumentName)
Check whether argument associated with the given key exists.
array
getArguments()
Get all arguments set on the given exchange.
int
getFlags()
Get all the flags currently set on the given exchange.
string|null
getName()
Get the configured name.
string|null
getType()
Get the configured type.
void
publish(string $message, string|null $routingKey = null, int|null $flags = null, array $headers = [])
Publish a message to an exchange.
Publish a message to the exchange represented by the AMQPExchange object.
void
setArgument(string $argumentName, string|int $argumentValue)
Set the value for the given key.
void
removeArgument(string $argumentName)
Set the value for the given key.
bool
setArguments(array $arguments)
Set all arguments on the exchange.
void
setFlags(int|null $flags)
Set the flags on an exchange.
void
setName(string $exchangeName)
Set the name of the exchange.
void
setType(string $exchangeType)
Set the type of the exchange.
Set the type of the exchange. This can be any of AMQP_EX_TYPE_DIRECT, AMQP_EX_TYPE_FANOUT, AMQP_EX_TYPE_HEADERS or AMQP_EX_TYPE_TOPIC.
AMQPChannel
getChannel()
Get the AMQPChannel object in use
AMQPConnection
getConnection()
Get the AMQPConnection object in use