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 public function listing(array $elements);
41 * Formats informational text.
43 * @param string|array $message
45 public function text($message);
48 * Formats a success result bar.
50 * @param string|array $message
52 public function success($message);
55 * Formats an error result bar.
57 * @param string|array $message
59 public function error($message);
62 * Formats an warning result bar.
64 * @param string|array $message
66 public function warning($message);
69 * Formats a note admonition.
71 * @param string|array $message
73 public function note($message);
76 * Formats a caution admonition.
78 * @param string|array $message
80 public function caution($message);
85 public function table(array $headers, array $rows);
90 * @param string $question
91 * @param string|null $default
92 * @param callable|null $validator
96 public function ask($question, $default = null, $validator = null);
99 * Asks a question with the user input hidden.
101 * @param string $question
102 * @param callable|null $validator
106 public function askHidden($question, $validator = null);
109 * Asks for confirmation.
111 * @param string $question
112 * @param bool $default
116 public function confirm($question, $default = true);
119 * Asks a choice question.
121 * @param string $question
122 * @param array $choices
123 * @param string|int|null $default
127 public function choice($question, array $choices, $default = null);
132 * @param int $count The number of newlines
134 public function newLine($count = 1);
137 * Starts the progress output.
139 * @param int $max Maximum steps (0 if unknown)
141 public function progressStart($max = 0);
144 * Advances the progress output X steps.
146 * @param int $step Number of steps to advance
148 public function progressAdvance($step = 1);
151 * Finishes the progress output.
153 public function progressFinish();