1 | <?php |
||
14 | class Message |
||
15 | { |
||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | private $message = ''; |
||
20 | /** |
||
21 | * @var ConsoleOutput |
||
22 | */ |
||
23 | private static $console; |
||
24 | |||
25 | /** |
||
26 | * Message constructor. |
||
27 | * |
||
28 | * @link http://symfony.com/doc/current/components/console/introduction.html#coloring-the-output |
||
29 | * |
||
30 | * @param string $type |
||
31 | * Could be "comment", "info", "question" or "error". |
||
32 | * @param int $indent |
||
33 | * Number of spaces. |
||
34 | * @param string[] $strings |
||
35 | * Paragraphs. |
||
36 | * @param string[] $placeholders |
||
37 | * Any replacement argument for "sprintf()". |
||
38 | * @param bool $output |
||
39 | * Print message or not. |
||
40 | */ |
||
41 | 4 | public function __construct($type, $indent, array $strings, array $placeholders = [], $output = true) |
|
54 | |||
55 | /** |
||
56 | * @return string |
||
57 | */ |
||
58 | 4 | public function __toString() |
|
62 | |||
63 | /** |
||
64 | * Print message to command line. |
||
65 | */ |
||
66 | 4 | public function output() |
|
70 | } |
||
71 |