1 | <?php |
||
21 | class QueueManager implements ContainerAwareInterface, QueueManagerInterface |
||
22 | { |
||
23 | protected $streamName; |
||
24 | protected $container; |
||
25 | |||
26 | 1 | public function setContainer(ContainerInterface $container = null) |
|
30 | |||
31 | /** |
||
32 | * @param string $queue |
||
33 | * @return QueueManager |
||
34 | */ |
||
35 | public function setQueueName($queue) |
||
41 | |||
42 | public function listActions() |
||
46 | |||
47 | public function executeAction($action, array $arguments=array()) |
||
48 | { |
||
49 | switch ($action) { |
||
50 | case 'delete': |
||
51 | return $this->deleteQueue(); |
||
52 | |||
53 | case 'info': |
||
54 | return $this->queueInfo(); |
||
55 | |||
56 | case 'list': |
||
57 | return $this->listQueues(); |
||
58 | |||
59 | default: |
||
60 | throw new InvalidArgumentException("Action $action not supported"); |
||
61 | } |
||
62 | } |
||
63 | |||
64 | protected function deleteQueue() |
||
69 | |||
70 | protected function queueInfo() |
||
75 | |||
76 | protected function listQueues() |
||
81 | |||
82 | protected function getProducerService() |
||
86 | } |