Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
33 | public function execute(InputInterface $input, OutputInterface $output) |
||
34 | { |
||
35 | $backend = $this->getContainer()->get('sonata.notification.backend'); |
||
36 | |||
37 | if (!$backend instanceof QueueDispatcherInterface) { |
||
38 | $output->writeln('The backend class <info>'.get_class($backend).'</info> does not provide multiple queues.'); |
||
39 | |||
40 | return; |
||
41 | } |
||
42 | |||
43 | $output->writeln('<info>List of queues available</info>'); |
||
44 | foreach ($backend->getQueues() as $queue) { |
||
45 | $output->writeln(sprintf('queue: <info>%s</info> - routing_key: <info>%s</info>', $queue['queue'], $queue['routing_key'])); |
||
46 | } |
||
47 | } |
||
48 | } |
||
49 |