1 | <?php |
||
19 | class QueueManager implements ContainerAwareInterface, QueueManagerInterface |
||
20 | { |
||
21 | protected $queueName; |
||
22 | protected $container; |
||
23 | protected $registeredQueues = array(); |
||
24 | |||
25 | public function setContainer(ContainerInterface $container = null) |
||
29 | |||
30 | /** |
||
31 | * @param string $queue |
||
32 | * @return QueueManager |
||
33 | */ |
||
34 | public function setQueueName($queue) |
||
40 | |||
41 | public function listActions() |
||
45 | |||
46 | public function executeAction($action, array $arguments=array()) |
||
71 | |||
72 | /** |
||
73 | * @return array keys are the queue names, values the queue type |
||
74 | */ |
||
75 | protected function listAvailableQueues() |
||
85 | |||
86 | protected function listConfiguredQueues() |
||
93 | |||
94 | /** |
||
95 | * NB: works only after the relevant config has been set in yml, which makes it less than ideal... |
||
96 | * See how the SQSTest does to dynamically create both the queue on the broker and the porducer + consumer |
||
97 | * @param $args allowed elements: see http://docs.aws.amazon.com/aws-sdk-php/v3/api/api-sqs-2012-11-05.html#createqueue |
||
98 | * @return the queue Url |
||
99 | * @throw \Exception on failure |
||
100 | */ |
||
101 | protected function createQueue($args) |
||
112 | |||
113 | /** |
||
114 | * @return array |
||
115 | * @throw \Exception on failure |
||
116 | */ |
||
117 | protected function queueInfo() |
||
123 | |||
124 | /** |
||
125 | * @return array |
||
126 | * @throw \Exception on failure |
||
127 | */ |
||
128 | protected function purgeQueue() |
||
134 | |||
135 | /** |
||
136 | * @return array |
||
137 | * @throw \Exception on failure |
||
138 | */ |
||
139 | protected function deleteQueue() |
||
145 | |||
146 | protected function getProducerService() |
||
150 | |||
151 | public function registerQueue($queueName) |
||
155 | } |
||
156 |