Skip to content

Commit

Permalink
fixed typo and added additional hit for NullOutput()
Browse files Browse the repository at this point in the history
  • Loading branch information
kuldipem authored and wouterj committed May 31, 2015
1 parent 9fb296d commit 5bc75d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cookbook/console/command_in_controller.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,14 @@ Run this command from inside your controller via::
'command' => 'swiftmailer:spool:send',
'--message-limit' => $messages,
));
// our use NullOutput() if you don't need the outpu
// You can use NullOutput() if you don't need the output
$output = new BufferedOutput();
$application->run($input, $output);

// return the output
// return the output, don't use if you used NullOutput()
$content = $output->fetch();

// return new Response(""), if you used NullOutput()
return new Response($content);
}
}
Expand Down

0 comments on commit 5bc75d4

Please sign in to comment.