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::
40
40
$kernel = $this->get('kernel');
41
41
$application = new Application($kernel);
42
42
$application->setAutoExit(false);
43
- // if your command define an argument (example: fooArgument)
44
- // you can pass it in the array under ArrayInput
43
+
45
44
$input = new ArrayInput(array(
46
45
'command' => 'swiftmailer:spool:send',
47
- '--message-limit' => $messages,
46
+ // (optional) define the value of command arguments
48
47
'fooArgument' => 'barValue',
48
+ // (optional) pass options to the command
49
+ '--message-limit' => $messages,
49
50
));
51
+
50
52
// You can use NullOutput() if you don't need the output
51
53
$output = new BufferedOutput();
52
54
$application->run($input, $output);
You can’t perform that action at this time.
0 commit comments