Skip to content

Commit

Permalink
Add documentation on using Symfony Style.
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson committed Sep 8, 2016
1 parent e6d24c2 commit 3f5a4e2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,12 @@ $name = $this->ask("What is your name?");

There are also `askDefault`, `askHidden`, and `confirm` methods.

In addition, Robo makes all of the methods of Symfony Style available throgh the `io()` method:

$this->io()->title("Build all site assets");

This allows Robo scripts to follow the [Symfony Console Style Guide](http://symfony.com/blog/new-in-symfony-2-8-console-style-guide) if desired.

### Formatters

It is preferable for commands that look up and display information should avoid doing IO directly, and should instead return the data they wish to display as an array. This data can then be converted into different data formats, such as "table" and "json". The user may select which formatter to use via the --format option. For details on formatters, see the [consolidation/output-formatters](https://github.com/consolidation-org/output-formatters) project.
Expand Down

0 comments on commit 3f5a4e2

Please sign in to comment.