1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* dummy job producer |
4
|
|
|
*/ |
5
|
|
|
|
6
|
|
|
namespace Graviton\RabbitMqBundle\Producer; |
7
|
|
|
|
8
|
|
|
use OldSound\RabbitMqBundle\RabbitMq\ProducerInterface; |
9
|
|
|
|
10
|
|
|
/** |
11
|
|
|
* @author List of contributors <https://github.com/libgraviton/graviton/graphs/contributors> |
12
|
|
|
* @license http://opensource.org/licenses/gpl-license.php GNU Public License |
13
|
|
|
* @link http://swisscom.ch |
14
|
|
|
*/ |
15
|
|
|
class Dummy implements ProducerInterface |
16
|
|
|
{ |
17
|
|
|
/** @var array list of events */ |
18
|
|
|
private $eventList = []; |
19
|
|
|
|
20
|
|
|
/** |
21
|
|
|
* Publishes the message and merges additional properties with basic properties |
22
|
|
|
* |
23
|
|
|
* @param string $msgBody body |
24
|
|
|
* @param string $routingKey routingKey |
25
|
|
|
* @param array $additionalProperties properties |
26
|
|
|
* |
27
|
|
|
* @return void |
28
|
|
|
*/ |
29
|
|
|
public function publish($msgBody, $routingKey = '', $additionalProperties = array()) |
30
|
|
|
{ |
31
|
|
|
$this->eventList[] = $msgBody; |
32
|
|
|
} |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* Dummy. |
36
|
|
|
* |
37
|
|
|
* @return DummyChannel |
38
|
|
|
*/ |
39
|
|
|
public function getChannel() |
40
|
|
|
{ |
41
|
|
|
return new DummyChannel(); |
42
|
|
|
} |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* Reset event list |
46
|
|
|
* @return void |
47
|
|
|
*/ |
48
|
|
|
public function resetEventList() |
49
|
|
|
{ |
50
|
|
|
$this->eventList = []; |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* Get current event list |
55
|
|
|
* |
56
|
|
|
* @return array |
57
|
|
|
*/ |
58
|
|
|
public function getEventList() |
59
|
|
|
{ |
60
|
|
|
return $this->eventList; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* Dummy setter |
65
|
|
|
* @param string $d dummy value |
66
|
|
|
* @return void |
67
|
|
|
*/ |
68
|
|
|
public function setContentType($d) |
|
|
|
|
69
|
|
|
{ |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* Dummy setter |
74
|
|
|
* @param string $d dummy value |
75
|
|
|
* @return void |
76
|
|
|
*/ |
77
|
|
|
public function setExchangeOptions($d) |
|
|
|
|
78
|
|
|
{ |
79
|
|
|
} |
80
|
|
|
|
81
|
|
|
/** |
82
|
|
|
* Dummy setter |
83
|
|
|
* @param string $d dummy value |
84
|
|
|
* @return void |
85
|
|
|
*/ |
86
|
|
|
public function setQueueOptions($d) |
|
|
|
|
87
|
|
|
{ |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* Dummy setter |
92
|
|
|
* @param bool $d dummy value |
93
|
|
|
* @return void |
94
|
|
|
*/ |
95
|
|
|
public function disableAutoSetupFabric($d = false) |
|
|
|
|
96
|
|
|
{ |
97
|
|
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* Dummy setter |
101
|
|
|
* @param bool $d dummy value |
102
|
|
|
* @return void |
103
|
|
|
*/ |
104
|
|
|
public function setEventDispatcher($d = false) |
|
|
|
|
105
|
|
|
{ |
106
|
|
|
} |
107
|
|
|
} |
108
|
|
|
|
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.