44
55namespace Enqueue \Gearman ;
66
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 ;
19-
20- class GearmanContext implements PsrContext
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+
20+ class GearmanContext implements Context
2121{
2222 /**
2323 * @var \GearmanClient
@@ -42,36 +42,36 @@ public function __construct(array $config)
4242 /**
4343 * @return GearmanMessage
4444 */
45- public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): PsrMessage
45+ public function createMessage (string $ body = '' , array $ properties = [], array $ headers = []): Message
4646 {
4747 return new GearmanMessage ($ body , $ properties , $ headers );
4848 }
4949
5050 /**
5151 * @return GearmanDestination
5252 */
53- public function createTopic (string $ topicName ): PsrTopic
53+ public function createTopic (string $ topicName ): Topic
5454 {
5555 return new GearmanDestination ($ topicName );
5656 }
5757
5858 /**
5959 * @return GearmanDestination
6060 */
61- public function createQueue (string $ queueName ): PsrQueue
61+ public function createQueue (string $ queueName ): Queue
6262 {
6363 return new GearmanDestination ($ queueName );
6464 }
6565
66- public function createTemporaryQueue (): PsrQueue
66+ public function createTemporaryQueue (): Queue
6767 {
6868 throw TemporaryQueueNotSupportedException ::providerDoestNotSupportIt ();
6969 }
7070
7171 /**
7272 * @return GearmanProducer
7373 */
74- public function createProducer (): PsrProducer
74+ public function createProducer (): Producer
7575 {
7676 return new GearmanProducer ($ this ->getClient ());
7777 }
@@ -81,7 +81,7 @@ public function createProducer(): PsrProducer
8181 *
8282 * @return GearmanConsumer
8383 */
84- public function createConsumer (PsrDestination $ destination ): PsrConsumer
84+ public function createConsumer (Destination $ destination ): Consumer
8585 {
8686 InvalidDestinationException ::assertDestinationInstanceOf ($ destination , GearmanDestination::class);
8787
@@ -99,12 +99,12 @@ public function close(): void
9999 }
100100 }
101101
102- public function createSubscriptionConsumer (): PsrSubscriptionConsumer
102+ public function createSubscriptionConsumer (): SubscriptionConsumer
103103 {
104104 throw SubscriptionConsumerNotSupportedException ::providerDoestNotSupportIt ();
105105 }
106106
107- public function purgeQueue (PsrQueue $ queue ): void
107+ public function purgeQueue (Queue $ queue ): void
108108 {
109109 throw PurgeQueueNotSupportedException ::providerDoestNotSupportIt ();
110110 }
0 commit comments