Skip to content

Commit

Permalink
minor #5341 fixed typo and added additional hit for NullOutput() (kul…
Browse files Browse the repository at this point in the history
…dipem)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #5341).

Discussion
----------

fixed typo and added additional hit for NullOutput()

Commits
-------

5bc75d4 fixed typo and added additional hit for NullOutput()
  • Loading branch information
wouterj committed May 31, 2015
2 parents 9fb296d + 5bc75d4 commit 0376f05
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 0376f05

Please sign in to comment.