This repository was archived by the owner on Mar 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAMQPExchange.php
More file actions
132 lines (119 loc) · 4.27 KB
/
AMQPExchange.php
File metadata and controls
132 lines (119 loc) · 4.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
/**
* @method int declare() Declare a new exchange on the broker.
* @throws AMQPExchangeException on failure.
* @throws AMQPChannelException if the channel is not open.
* @throws AMQPConnectionException if the connection to the broker was lost.
*/
class AMQPExchange {
/**
* Bind to another exchange
* @param string $destination_exchange_name The name of the destination exchange in the binding.
* @param string $source_exchange_name The name of the source exchange in the binding.
* @param string $routing_key The routing key to use as a binding.
* @return bool
* @throws AMQPExchangeException on failure.
* @throws AMQPChannelException if the channel is not open.
* @throws AMQPConnectionException if the connection to the broker was lost.
*/
public function bind($destination_exchange_name, $source_exchange_name, $routing_key) {}
/**
* Create an instance of AMQPExchange
* @param AMQPChannel $amqp_channel
* @return AMQPExchange
* @throws AMQPExchangeException when amqp_channel is not connected to a broker.
* @throws AMQPConnectionException if the connection to the broker was lost.
*/
public function __construct(AMQPChannel $amqp_channel) {}
/**
* Delete and exchange from the broker.
* @param int $flags Optionally AMQP_IFUNUSED can be specified to indicate the exchange should
* not be deleted until no clients are connected to it.
* @return bool
* @throws AMQPExchangeException on failure.
* @throws AMQPChannelException if the channel is not open.
* @throws AMQPConnectionException if the connection to the broker was lost.
*/
public function delete($flags = AMQP_NOPARAM) {}
/**
* Get the argument associated with the given key.
* @param string $key
* @return mixed
*/
public function getArgument($key) {}
/**
* Get all arguments as an array of key/value pairs that are currently set on the given exchange.
* @return array
*/
public function getArguments() {}
/**
* Get all the flags currently set on the given exchange.
* @return int
*/
public function getFlags() {}
/**
* Get the configured name.
* @return string
*/
public function getName() {}
/**
* Get the configured type.
* @return string
*/
public function getType() {}
/**
* Publish a message to an exchange.
* @param string $message
* @param string $routing_key
* @param int $flags One or more of AMQP_MANDATORY and AMQP_IMMEDIATE.
* @param array $attributes
* array(
* 'Content-type' => 'text/plain',
* 'Content-encoding' => NULL,
* 'message_id' => NULL,
* 'user_id' => NULL,
* 'app_id' => NULL,
* 'delivery_mode' => NULL,
* 'priority' => NULL,
* 'timestamp' => NULL,
* 'expiration' => NULL,
* 'type' => NULL,
* 'reply_to' => NULL,
* )
* @return bool
* @throws AMQPExchangeException on failure.
* @throws AMQPChannelException if the channel is not open.
* @throws AMQPConnectionException if the connection to the broker was lost.
*/
public function publish($message, $routing_key, $flags = AMQP_NOPARAM, $attributes = array()) {}
/**
* Set the key to the given value.
* @param string $key
* @param mixed $value
*/
public function setArgument($key, $value) {}
/**
* Set all arguments on the exchange
* All other argument settings will be wiped.
* @param array $arguments
*/
public function setArguments($arguments) {}
/**
* Set the flags on an exchange
* This call currently only considers the following flag: AMQP_PASSIVE
* @param int $flags A bitmask of flags.
*/
public function setFlags($flags) {}
/**
* Set the name of the exchange
* @param string $exchange_name
*/
public function setName($exchange_name) {}
/**
* 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.
* @param string $exchange_type
* @return string
*/
public function setType($exchange_type) {}
}