1 | <?php |
||
21 | class ProduceCommand extends ContainerAwareCommand |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Configures command |
||
26 | * |
||
27 | * @return void |
||
28 | */ |
||
29 | 4 | protected function configure() |
|
30 | { |
||
31 | 4 | parent::configure(); |
|
32 | 4 | $this->setName('graviton:message:produce') |
|
33 | 4 | ->setDescription( |
|
34 | 'Puts a message onto the RabbitMQ channel.' |
||
35 | 4 | ) |
|
36 | 4 | ->addArgument( |
|
37 | 4 | 'message', |
|
38 | 4 | InputArgument::REQUIRED, |
|
39 | 'The message to be sent e.g. "bundle.resource.update"' |
||
40 | 4 | ) |
|
41 | 4 | ->addArgument( |
|
42 | 4 | 'data', |
|
43 | 4 | InputArgument::OPTIONAL, |
|
44 | 4 | 'JSON formatted data to send to with the message.', |
|
45 | '{}' |
||
46 | 4 | ); |
|
47 | 4 | } |
|
48 | |||
49 | /** |
||
50 | * @param InputInterface $input The input |
||
51 | * @param OutputInterface $output The output |
||
52 | * |
||
53 | * @return void |
||
54 | */ |
||
55 | protected function execute(InputInterface $input, OutputInterface $output) |
||
64 | } |
||
65 |