475c268ffe40381df6a72915c0c9214a9b532acd
[yaffs-website] / vendor / symfony / console / Style / StyleInterface.php
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     public function listing(array $elements);
39
40     /**
41      * Formats informational text.
42      *
43      * @param string|array $message
44      */
45     public function text($message);
46
47     /**
48      * Formats a success result bar.
49      *
50      * @param string|array $message
51      */
52     public function success($message);
53
54     /**
55      * Formats an error result bar.
56      *
57      * @param string|array $message
58      */
59     public function error($message);
60
61     /**
62      * Formats an warning result bar.
63      *
64      * @param string|array $message
65      */
66     public function warning($message);
67
68     /**
69      * Formats a note admonition.
70      *
71      * @param string|array $message
72      */
73     public function note($message);
74
75     /**
76      * Formats a caution admonition.
77      *
78      * @param string|array $message
79      */
80     public function caution($message);
81
82     /**
83      * Formats a table.
84      */
85     public function table(array $headers, array $rows);
86
87     /**
88      * Asks a question.
89      *
90      * @param string        $question
91      * @param string|null   $default
92      * @param callable|null $validator
93      *
94      * @return mixed
95      */
96     public function ask($question, $default = null, $validator = null);
97
98     /**
99      * Asks a question with the user input hidden.
100      *
101      * @param string        $question
102      * @param callable|null $validator
103      *
104      * @return mixed
105      */
106     public function askHidden($question, $validator = null);
107
108     /**
109      * Asks for confirmation.
110      *
111      * @param string $question
112      * @param bool   $default
113      *
114      * @return bool
115      */
116     public function confirm($question, $default = true);
117
118     /**
119      * Asks a choice question.
120      *
121      * @param string          $question
122      * @param array           $choices
123      * @param string|int|null $default
124      *
125      * @return mixed
126      */
127     public function choice($question, array $choices, $default = null);
128
129     /**
130      * Add newline(s).
131      *
132      * @param int $count The number of newlines
133      */
134     public function newLine($count = 1);
135
136     /**
137      * Starts the progress output.
138      *
139      * @param int $max Maximum steps (0 if unknown)
140      */
141     public function progressStart($max = 0);
142
143     /**
144      * Advances the progress output X steps.
145      *
146      * @param int $step Number of steps to advance
147      */
148     public function progressAdvance($step = 1);
149
150     /**
151      * Finishes the progress output.
152      */
153     public function progressFinish();
154 }