15
15
use Interop \Amqp \Impl \AmqpMessage ;
16
16
use Interop \Amqp \Impl \AmqpQueue ;
17
17
use Interop \Amqp \Impl \AmqpTopic ;
18
- use Interop \Queue \Exception ;
19
- use Interop \Queue \InvalidDestinationException ;
20
- use Interop \Queue \PsrConsumer ;
21
- use Interop \Queue \PsrDestination ;
22
- use Interop \Queue \PsrMessage ;
23
- use Interop \Queue \PsrProducer ;
24
- use Interop \Queue \PsrQueue ;
25
- use Interop \Queue \PsrSubscriptionConsumer ;
26
- use Interop \Queue \PsrTopic ;
18
+ use Interop \Queue \Consumer ;
19
+ use Interop \Queue \Destination ;
20
+ use Interop \Queue \Exception \ Exception ;
21
+ use Interop \Queue \Exception \ InvalidDestinationException ;
22
+ use Interop \Queue \Message ;
23
+ use Interop \Queue \Producer ;
24
+ use Interop \Queue \Queue ;
25
+ use Interop \Queue \SubscriptionConsumer ;
26
+ use Interop \Queue \Topic ;
27
27
use PhpAmqpLib \Channel \AMQPChannel ;
28
28
use PhpAmqpLib \Connection \AbstractConnection ;
29
29
use PhpAmqpLib \Message \AMQPMessage as LibAMQPMessage ;
@@ -62,23 +62,23 @@ public function __construct(AbstractConnection $connection, array $config)
62
62
/**
63
63
* @return InteropAmqpMessage
64
64
*/
65
- public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): PsrMessage
65
+ public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): Message
66
66
{
67
67
return new AmqpMessage ($ body , $ properties , $ headers );
68
68
}
69
69
70
70
/**
71
71
* @return InteropAmqpQueue
72
72
*/
73
- public function createQueue (string $ name ): PsrQueue
73
+ public function createQueue (string $ name ): Queue
74
74
{
75
75
return new AmqpQueue ($ name );
76
76
}
77
77
78
78
/**
79
79
* @return InteropAmqpTopic
80
80
*/
81
- public function createTopic (string $ name ): PsrTopic
81
+ public function createTopic (string $ name ): Topic
82
82
{
83
83
return new AmqpTopic ($ name );
84
84
}
@@ -88,9 +88,9 @@ public function createTopic(string $name): PsrTopic
88
88
*
89
89
* @return AmqpConsumer
90
90
*/
91
- public function createConsumer (PsrDestination $ destination ): PsrConsumer
91
+ public function createConsumer (Destination $ destination ): Consumer
92
92
{
93
- $ destination instanceof PsrTopic
93
+ $ destination instanceof Topic
94
94
? InvalidDestinationException::assertDestinationInstanceOf ($ destination , InteropAmqpTopic::class)
95
95
: InvalidDestinationException::assertDestinationInstanceOf ($ destination , InteropAmqpQueue::class)
96
96
;
@@ -108,15 +108,15 @@ public function createConsumer(PsrDestination $destination): PsrConsumer
108
108
/**
109
109
* @return AmqpSubscriptionConsumer
110
110
*/
111
- public function createSubscriptionConsumer (): PsrSubscriptionConsumer
111
+ public function createSubscriptionConsumer (): SubscriptionConsumer
112
112
{
113
113
return new AmqpSubscriptionConsumer ($ this );
114
114
}
115
115
116
116
/**
117
117
* @return AmqpProducer
118
118
*/
119
- public function createProducer (): PsrProducer
119
+ public function createProducer (): Producer
120
120
{
121
121
$ producer = new AmqpProducer ($ this ->getLibChannel (), $ this );
122
122
$ producer ->setDelayStrategy ($ this ->delayStrategy );
@@ -127,7 +127,7 @@ public function createProducer(): PsrProducer
127
127
/**
128
128
* @return InteropAmqpQueue
129
129
*/
130
- public function createTemporaryQueue (): PsrQueue
130
+ public function createTemporaryQueue (): Queue
131
131
{
132
132
list ($ name ) = $ this ->getLibChannel ()->queue_declare ('' , false , false , true , false );
133
133
@@ -188,7 +188,7 @@ public function deleteQueue(InteropAmqpQueue $queue): void
188
188
/**
189
189
* @param AmqpQueue $queue
190
190
*/
191
- public function purgeQueue (PsrQueue $ queue ): void
191
+ public function purgeQueue (Queue $ queue ): void
192
192
{
193
193
InvalidDestinationException::assertDestinationInstanceOf ($ queue , InteropAmqpQueue::class);
194
194
0 commit comments