4
4
5
5
namespace Enqueue \Pheanstalk ;
6
6
7
- use Interop \Queue \InvalidDestinationException ;
8
- use Interop \Queue \PsrConsumer ;
9
- use Interop \Queue \PsrContext ;
10
- use Interop \Queue \PsrDestination ;
11
- use Interop \Queue \PsrMessage ;
12
- use Interop \Queue \PsrProducer ;
13
- use Interop \Queue \PsrQueue ;
14
- use Interop \Queue \PsrSubscriptionConsumer ;
15
- use Interop \Queue \PsrTopic ;
16
- use Interop \Queue \PurgeQueueNotSupportedException ;
17
- use Interop \Queue \SubscriptionConsumerNotSupportedException ;
18
- use Interop \Queue \TemporaryQueueNotSupportedException ;
7
+ use Interop \Queue \Consumer ;
8
+ use Interop \Queue \Context ;
9
+ use Interop \Queue \Destination ;
10
+ use Interop \Queue \Exception \ InvalidDestinationException ;
11
+ use Interop \Queue \Exception \ PurgeQueueNotSupportedException ;
12
+ use Interop \Queue \Exception \ SubscriptionConsumerNotSupportedException ;
13
+ use Interop \Queue \Exception \ TemporaryQueueNotSupportedException ;
14
+ use Interop \Queue \Message ;
15
+ use Interop \Queue \Producer ;
16
+ use Interop \Queue \Queue ;
17
+ use Interop \Queue \SubscriptionConsumer ;
18
+ use Interop \Queue \Topic ;
19
19
use Pheanstalk \Pheanstalk ;
20
20
21
- class PheanstalkContext implements PsrContext
21
+ class PheanstalkContext implements Context
22
22
{
23
23
/**
24
24
* @var Pheanstalk
@@ -33,36 +33,36 @@ public function __construct(Pheanstalk $pheanstalk)
33
33
/**
34
34
* @return PheanstalkMessage
35
35
*/
36
- public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): PsrMessage
36
+ public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): Message
37
37
{
38
38
return new PheanstalkMessage ($ body , $ properties , $ headers );
39
39
}
40
40
41
41
/**
42
42
* @return PheanstalkDestination
43
43
*/
44
- public function createTopic (string $ topicName ): PsrTopic
44
+ public function createTopic (string $ topicName ): Topic
45
45
{
46
46
return new PheanstalkDestination ($ topicName );
47
47
}
48
48
49
49
/**
50
50
* @return PheanstalkDestination
51
51
*/
52
- public function createQueue (string $ queueName ): PsrQueue
52
+ public function createQueue (string $ queueName ): Queue
53
53
{
54
54
return new PheanstalkDestination ($ queueName );
55
55
}
56
56
57
- public function createTemporaryQueue (): PsrQueue
57
+ public function createTemporaryQueue (): Queue
58
58
{
59
59
throw TemporaryQueueNotSupportedException::providerDoestNotSupportIt ();
60
60
}
61
61
62
62
/**
63
63
* @return PheanstalkProducer
64
64
*/
65
- public function createProducer (): PsrProducer
65
+ public function createProducer (): Producer
66
66
{
67
67
return new PheanstalkProducer ($ this ->pheanstalk );
68
68
}
@@ -72,7 +72,7 @@ public function createProducer(): PsrProducer
72
72
*
73
73
* @return PheanstalkConsumer
74
74
*/
75
- public function createConsumer (PsrDestination $ destination ): PsrConsumer
75
+ public function createConsumer (Destination $ destination ): Consumer
76
76
{
77
77
InvalidDestinationException::assertDestinationInstanceOf ($ destination , PheanstalkDestination::class);
78
78
@@ -84,12 +84,12 @@ public function close(): void
84
84
$ this ->pheanstalk ->getConnection ()->disconnect ();
85
85
}
86
86
87
- public function createSubscriptionConsumer (): PsrSubscriptionConsumer
87
+ public function createSubscriptionConsumer (): SubscriptionConsumer
88
88
{
89
89
throw SubscriptionConsumerNotSupportedException::providerDoestNotSupportIt ();
90
90
}
91
91
92
- public function purgeQueue (PsrQueue $ queue ): void
92
+ public function purgeQueue (Queue $ queue ): void
93
93
{
94
94
throw PurgeQueueNotSupportedException::providerDoestNotSupportIt ();
95
95
}
0 commit comments