| 1 |
<?php |
| 2 |
|
| 3 |
/* |
| 4 |
* This file is part of the Symfony package. |
| 5 |
* |
| 6 |
* (c) Fabien Potencier <[email protected]> |
| 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 <[email protected]> |
| 18 |
*/ |
| 19 |
interface StyleInterface |
| 20 |
{ |
| 21 |
/** |
| 22 |
* Formats a command title. |
| 23 |
*/ |
| 24 |
public function title(string $message): void; |
| 25 |
|
| 26 |
/** |
| 27 |
* Formats a section title. |
| 28 |
*/ |
| 29 |
public function section(string $message): void; |
| 30 |
|
| 31 |
/** |
| 32 |
* Formats a list. |
| 33 |
*/ |
| 34 |
public function listing(array $elements): void; |
| 35 |
|
| 36 |
/** |
| 37 |
* Formats informational text. |
| 38 |
*/ |
| 39 |
public function text(string|array $message): void; |
| 40 |
|
| 41 |
/** |
| 42 |
* Formats a success result bar. |
| 43 |
*/ |
| 44 |
public function success(string|array $message): void; |
| 45 |
|
| 46 |
/** |
| 47 |
* Formats an error result bar. |
| 48 |
*/ |
| 49 |
public function error(string|array $message): void; |
| 50 |
|
| 51 |
/** |
| 52 |
* Formats an warning result bar. |
| 53 |
*/ |
| 54 |
public function warning(string|array $message): void; |
| 55 |
|
| 56 |
/** |
| 57 |
* Formats a note admonition. |
| 58 |
*/ |
| 59 |
public function note(string|array $message): void; |
| 60 |
|
| 61 |
/** |
| 62 |
* Formats a caution admonition. |
| 63 |
*/ |
| 64 |
public function caution(string|array $message): void; |
| 65 |
|
| 66 |
/** |
| 67 |
* Formats a table. |
| 68 |
*/ |
| 69 |
public function table(array $headers, array $rows): void; |
| 70 |
|
| 71 |
/** |
| 72 |
* Asks a question. |
| 73 |
* |
| 74 |
* @param (callable(mixed):mixed)|null $validator |
| 75 |
*/ |
| 76 |
public function ask(string $question, ?string $default = null, ?callable $validator = null): mixed; |
| 77 |
|
| 78 |
/** |
| 79 |
* Asks a question with the user input hidden. |
| 80 |
* |
| 81 |
* @param (callable(mixed):mixed)|null $validator |
| 82 |
*/ |
| 83 |
public function askHidden(string $question, ?callable $validator = null): mixed; |
| 84 |
|
| 85 |
/** |
| 86 |
* Asks for confirmation. |
| 87 |
*/ |
| 88 |
public function confirm(string $question, bool $default = true): bool; |
| 89 |
|
| 90 |
/** |
| 91 |
* Asks a choice question. |
| 92 |
*/ |
| 93 |
public function choice(string $question, array $choices, mixed $default = null): mixed; |
| 94 |
|
| 95 |
/** |
| 96 |
* Add newline(s). |
| 97 |
*/ |
| 98 |
public function newLine(int $count = 1): void; |
| 99 |
|
| 100 |
/** |
| 101 |
* Starts the progress output. |
| 102 |
*/ |
| 103 |
public function progressStart(int $max = 0): void; |
| 104 |
|
| 105 |
/** |
| 106 |
* Advances the progress output X steps. |
| 107 |
*/ |
| 108 |
public function progressAdvance(int $step = 1): void; |
| 109 |
|
| 110 |
/** |
| 111 |
* Finishes the progress output. |
| 112 |
*/ |
| 113 |
public function progressFinish(): void; |
| 114 |
} |