comparison vendor/symfony/console/Style/StyleInterface.php @ 0:4c8ae668cc8c

Initial import (non-working)
author Chris Cannam
date Wed, 29 Nov 2017 16:09:58 +0000
parents
children 1fec387a4317
comparison
equal deleted inserted replaced
-1:000000000000 0:4c8ae668cc8c
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Console\Style;
13
14 /**
15 * Output style helpers.
16 *
17 * @author Kevin Bond <kevinbond@gmail.com>
18 */
19 interface StyleInterface
20 {
21 /**
22 * Formats a command title.
23 *
24 * @param string $message
25 */
26 public function title($message);
27
28 /**
29 * Formats a section title.
30 *
31 * @param string $message
32 */
33 public function section($message);
34
35 /**
36 * Formats a list.
37 *
38 * @param array $elements
39 */
40 public function listing(array $elements);
41
42 /**
43 * Formats informational text.
44 *
45 * @param string|array $message
46 */
47 public function text($message);
48
49 /**
50 * Formats a success result bar.
51 *
52 * @param string|array $message
53 */
54 public function success($message);
55
56 /**
57 * Formats an error result bar.
58 *
59 * @param string|array $message
60 */
61 public function error($message);
62
63 /**
64 * Formats an warning result bar.
65 *
66 * @param string|array $message
67 */
68 public function warning($message);
69
70 /**
71 * Formats a note admonition.
72 *
73 * @param string|array $message
74 */
75 public function note($message);
76
77 /**
78 * Formats a caution admonition.
79 *
80 * @param string|array $message
81 */
82 public function caution($message);
83
84 /**
85 * Formats a table.
86 *
87 * @param array $headers
88 * @param array $rows
89 */
90 public function table(array $headers, array $rows);
91
92 /**
93 * Asks a question.
94 *
95 * @param string $question
96 * @param string|null $default
97 * @param callable|null $validator
98 *
99 * @return string
100 */
101 public function ask($question, $default = null, $validator = null);
102
103 /**
104 * Asks a question with the user input hidden.
105 *
106 * @param string $question
107 * @param callable|null $validator
108 *
109 * @return string
110 */
111 public function askHidden($question, $validator = null);
112
113 /**
114 * Asks for confirmation.
115 *
116 * @param string $question
117 * @param bool $default
118 *
119 * @return bool
120 */
121 public function confirm($question, $default = true);
122
123 /**
124 * Asks a choice question.
125 *
126 * @param string $question
127 * @param array $choices
128 * @param string|int|null $default
129 *
130 * @return string
131 */
132 public function choice($question, array $choices, $default = null);
133
134 /**
135 * Add newline(s).
136 *
137 * @param int $count The number of newlines
138 */
139 public function newLine($count = 1);
140
141 /**
142 * Starts the progress output.
143 *
144 * @param int $max Maximum steps (0 if unknown)
145 */
146 public function progressStart($max = 0);
147
148 /**
149 * Advances the progress output X steps.
150 *
151 * @param int $step Number of steps to advance
152 */
153 public function progressAdvance($step = 1);
154
155 /**
156 * Finishes the progress output.
157 */
158 public function progressFinish();
159 }