Skip to content

Commit 91188b9

Browse files
committed
Add method from queue-interop 0.6 that defines ttl, priority and delviery delay.
1 parent 1209f11 commit 91188b9

11 files changed

Lines changed: 540 additions & 0 deletions

File tree

‎pkg/amqp-ext/AmqpProducer.php‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,52 @@ public function send(PsrDestination $destination, PsrMessage $message)
7474
);
7575
}
7676
}
77+
78+
/**
79+
* {@inheritdoc}
80+
*/
81+
public function setDeliveryDelay($deliveryDelay)
82+
{
83+
throw new \LogicException('Not implemented');
84+
}
85+
86+
/**
87+
* {@inheritdoc}
88+
*/
89+
public function getDeliveryDelay()
90+
{
91+
return null;
92+
}
93+
94+
/**
95+
* {@inheritdoc}
96+
*/
97+
public function setPriority($priority)
98+
{
99+
throw new \LogicException('Not implemented');
100+
}
101+
102+
/**
103+
* {@inheritdoc}
104+
*/
105+
public function getPriority()
106+
{
107+
return null;
108+
}
109+
110+
/**
111+
* {@inheritdoc}
112+
*/
113+
public function setTimeToLive($timeToLive)
114+
{
115+
throw new \LogicException('Not implemented');
116+
}
117+
118+
/**
119+
* {@inheritdoc}
120+
*/
121+
public function getTimeToLive()
122+
{
123+
return null;
124+
}
77125
}

‎pkg/amqp-lib/AmqpProducer.php‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,52 @@ public function send(PsrDestination $destination, PsrMessage $message)
6969
);
7070
}
7171
}
72+
73+
/**
74+
* {@inheritdoc}
75+
*/
76+
public function setDeliveryDelay($deliveryDelay)
77+
{
78+
throw new \LogicException('Not implemented');
79+
}
80+
81+
/**
82+
* {@inheritdoc}
83+
*/
84+
public function getDeliveryDelay()
85+
{
86+
return null;
87+
}
88+
89+
/**
90+
* {@inheritdoc}
91+
*/
92+
public function setPriority($priority)
93+
{
94+
throw new \LogicException('Not implemented');
95+
}
96+
97+
/**
98+
* {@inheritdoc}
99+
*/
100+
public function getPriority()
101+
{
102+
return null;
103+
}
104+
105+
/**
106+
* {@inheritdoc}
107+
*/
108+
public function setTimeToLive($timeToLive)
109+
{
110+
throw new \LogicException('Not implemented');
111+
}
112+
113+
/**
114+
* {@inheritdoc}
115+
*/
116+
public function getTimeToLive()
117+
{
118+
return null;
119+
}
72120
}

‎pkg/dbal/DbalProducer.php‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,52 @@ public function send(PsrDestination $destination, PsrMessage $message)
8585
throw new Exception('The transport fails to send the message due to some internal error.', null, $e);
8686
}
8787
}
88+
89+
/**
90+
* {@inheritdoc}
91+
*/
92+
public function setDeliveryDelay($deliveryDelay)
93+
{
94+
throw new \LogicException('Not implemented');
95+
}
96+
97+
/**
98+
* {@inheritdoc}
99+
*/
100+
public function getDeliveryDelay()
101+
{
102+
return null;
103+
}
104+
105+
/**
106+
* {@inheritdoc}
107+
*/
108+
public function setPriority($priority)
109+
{
110+
throw new \LogicException('Not implemented');
111+
}
112+
113+
/**
114+
* {@inheritdoc}
115+
*/
116+
public function getPriority()
117+
{
118+
return null;
119+
}
120+
121+
/**
122+
* {@inheritdoc}
123+
*/
124+
public function setTimeToLive($timeToLive)
125+
{
126+
throw new \LogicException('Not implemented');
127+
}
128+
129+
/**
130+
* {@inheritdoc}
131+
*/
132+
public function getTimeToLive()
133+
{
134+
return null;
135+
}
88136
}

‎pkg/fs/FsProducer.php‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,52 @@ public function send(PsrDestination $destination, PsrMessage $message)
5656
fwrite($file, $rawMessage);
5757
});
5858
}
59+
60+
/**
61+
* {@inheritdoc}
62+
*/
63+
public function setDeliveryDelay($deliveryDelay)
64+
{
65+
throw new \LogicException('Not implemented');
66+
}
67+
68+
/**
69+
* {@inheritdoc}
70+
*/
71+
public function getDeliveryDelay()
72+
{
73+
return null;
74+
}
75+
76+
/**
77+
* {@inheritdoc}
78+
*/
79+
public function setPriority($priority)
80+
{
81+
throw new \LogicException('Not implemented');
82+
}
83+
84+
/**
85+
* {@inheritdoc}
86+
*/
87+
public function getPriority()
88+
{
89+
return null;
90+
}
91+
92+
/**
93+
* {@inheritdoc}
94+
*/
95+
public function setTimeToLive($timeToLive)
96+
{
97+
throw new \LogicException('Not implemented');
98+
}
99+
100+
/**
101+
* {@inheritdoc}
102+
*/
103+
public function getTimeToLive()
104+
{
105+
return null;
106+
}
59107
}

‎pkg/gearman/GearmanProducer.php‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,52 @@ public function send(PsrDestination $destination, PsrMessage $message)
4141
throw new \GearmanException(sprintf('The return code is not %s (GEARMAN_SUCCESS) but %s', \GEARMAN_SUCCESS, $code));
4242
}
4343
}
44+
45+
/**
46+
* {@inheritdoc}
47+
*/
48+
public function setDeliveryDelay($deliveryDelay)
49+
{
50+
throw new \LogicException('Not implemented');
51+
}
52+
53+
/**
54+
* {@inheritdoc}
55+
*/
56+
public function getDeliveryDelay()
57+
{
58+
return null;
59+
}
60+
61+
/**
62+
* {@inheritdoc}
63+
*/
64+
public function setPriority($priority)
65+
{
66+
throw new \LogicException('Not implemented');
67+
}
68+
69+
/**
70+
* {@inheritdoc}
71+
*/
72+
public function getPriority()
73+
{
74+
return null;
75+
}
76+
77+
/**
78+
* {@inheritdoc}
79+
*/
80+
public function setTimeToLive($timeToLive)
81+
{
82+
throw new \LogicException('Not implemented');
83+
}
84+
85+
/**
86+
* {@inheritdoc}
87+
*/
88+
public function getTimeToLive()
89+
{
90+
return null;
91+
}
4492
}

‎pkg/null/NullProducer.php‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,70 @@
88

99
class NullProducer implements PsrProducer
1010
{
11+
private $priority;
12+
13+
private $timeToLive;
14+
15+
private $deliveryDelay;
16+
1117
/**
1218
* {@inheritdoc}
1319
*/
1420
public function send(PsrDestination $destination, PsrMessage $message)
1521
{
1622
}
23+
24+
/**
25+
* {@inheritdoc}
26+
*/
27+
public function setDeliveryDelay($deliveryDelay)
28+
{
29+
$this->deliveryDelay = $deliveryDelay;
30+
31+
return $this;
32+
}
33+
34+
/**
35+
* {@inheritdoc}
36+
*/
37+
public function getDeliveryDelay()
38+
{
39+
return $this->deliveryDelay;
40+
}
41+
42+
/**
43+
* {@inheritdoc}
44+
*/
45+
public function setPriority($priority)
46+
{
47+
$this->priority = $priority;
48+
49+
return $this;
50+
}
51+
52+
/**
53+
* {@inheritdoc}
54+
*/
55+
public function getPriority()
56+
{
57+
return $this->priority;
58+
}
59+
60+
/**
61+
* {@inheritdoc}
62+
*/
63+
public function setTimeToLive($timeToLive)
64+
{
65+
$this->timeToLive = $timeToLive;
66+
67+
return $this;
68+
}
69+
70+
/**
71+
* {@inheritdoc}
72+
*/
73+
public function getTimeToLive()
74+
{
75+
return $this->timeToLive;
76+
}
1777
}

‎pkg/pheanstalk/PheanstalkProducer.php‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,52 @@ public function send(PsrDestination $destination, PsrMessage $message)
5151
$message->getTimeToRun()
5252
);
5353
}
54+
55+
/**
56+
* {@inheritdoc}
57+
*/
58+
public function setDeliveryDelay($deliveryDelay)
59+
{
60+
throw new \LogicException('Not implemented');
61+
}
62+
63+
/**
64+
* {@inheritdoc}
65+
*/
66+
public function getDeliveryDelay()
67+
{
68+
return null;
69+
}
70+
71+
/**
72+
* {@inheritdoc}
73+
*/
74+
public function setPriority($priority)
75+
{
76+
throw new \LogicException('Not implemented');
77+
}
78+
79+
/**
80+
* {@inheritdoc}
81+
*/
82+
public function getPriority()
83+
{
84+
return null;
85+
}
86+
87+
/**
88+
* {@inheritdoc}
89+
*/
90+
public function setTimeToLive($timeToLive)
91+
{
92+
throw new \LogicException('Not implemented');
93+
}
94+
95+
/**
96+
* {@inheritdoc}
97+
*/
98+
public function getTimeToLive()
99+
{
100+
return null;
101+
}
54102
}

0 commit comments

Comments
 (0)