File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -40,13 +40,15 @@ Run this command from inside your controller via::
4040 $kernel = $this->get('kernel');
4141 $application = new Application($kernel);
4242 $application->setAutoExit(false);
43- // if your command define an argument (example: fooArgument)
44- // you can pass it in the array under ArrayInput
43+
4544 $input = new ArrayInput(array(
4645 'command' => 'swiftmailer:spool:send',
47- '--message-limit' => $messages,
46+ // (optional) define the value of command arguments
4847 'fooArgument' => 'barValue',
48+ // (optional) pass options to the command
49+ '--message-limit' => $messages,
4950 ));
51+
5052 // You can use NullOutput() if you don't need the output
5153 $output = new BufferedOutput();
5254 $application->run($input, $output);
You can’t perform that action at this time.
0 commit comments