4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Console\Style;
15 * Output style helpers.
17 * @author Kevin Bond <kevinbond@gmail.com>
19 interface StyleInterface
22 * Formats a command title.
24 * @param string $message
26 public function title($message);
29 * Formats a section title.
31 * @param string $message
33 public function section($message);
38 * @param array $elements
40 public function listing(array $elements);
43 * Formats informational text.
45 * @param string|array $message
47 public function text($message);
50 * Formats a success result bar.
52 * @param string|array $message
54 public function success($message);
57 * Formats an error result bar.
59 * @param string|array $message
61 public function error($message);
64 * Formats an warning result bar.
66 * @param string|array $message
68 public function warning($message);
71 * Formats a note admonition.
73 * @param string|array $message
75 public function note($message);
78 * Formats a caution admonition.
80 * @param string|array $message
82 public function caution($message);
87 * @param array $headers
90 public function table(array $headers, array $rows);
95 * @param string $question
96 * @param string|null $default
97 * @param callable|null $validator
101 public function ask($question, $default = null, $validator = null);
104 * Asks a question with the user input hidden.
106 * @param string $question
107 * @param callable|null $validator
111 public function askHidden($question, $validator = null);
114 * Asks for confirmation.
116 * @param string $question
117 * @param bool $default
121 public function confirm($question, $default = true);
124 * Asks a choice question.
126 * @param string $question
127 * @param array $choices
128 * @param string|int|null $default
132 public function choice($question, array $choices, $default = null);
137 * @param int $count The number of newlines
139 public function newLine($count = 1);
142 * Starts the progress output.
144 * @param int $max Maximum steps (0 if unknown)
146 public function progressStart($max = 0);
149 * Advances the progress output X steps.
151 * @param int $step Number of steps to advance
153 public function progressAdvance($step = 1);
156 * Finishes the progress output.
158 public function progressFinish();