Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Improved coloring output section with OutputFormatterStyle and colors…

…/options list
  • Loading branch information...
commit bbeb39619f3d6ff3d217cccb50e051fec5c62f19 1 parent 019302f
Raul Fraile authored March 13, 2012 weaverryan committed March 18, 2012

Showing 1 changed file with 12 additions and 0 deletions. Show diff stats Hide diff stats

  1. 12  components/console.rst
12  components/console.rst
Source Rendered
@@ -117,6 +117,18 @@ output. For example::
117 117
     // white text on a red background
118 118
     $output->writeln('<error>foo</error>');
119 119
 
  120
+It is possible to define your own styles using the class 
  121
+:class:`Symfony\\Component\\Console\\Formatter\\OutputFormatterStyle`:
  122
+
  123
+    $style = new OutputFormatterStyle('red', 'yellow', array('bold', 'blink'));
  124
+    $output->getFormatter()->setStyle('fire', $style);
  125
+    $output->writeln('<fire>foo</fire>');
  126
+
  127
+Available foreground and background colors are: ``black``, ``red``, ``green``, 
  128
+``yellow``, ``blue``, ``magenta``, ``cyan`` and ``white``.
  129
+
  130
+And available options are: 'bold', 'underscore', 'blink', 'reverse' and 'conceal'.
  131
+
120 132
 Using Command Arguments
121 133
 -----------------------
122 134
 

0 notes on commit bbeb396

Please sign in to comment.
Something went wrong with that request. Please try again.