File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/Symfony/Component/Console/Helper Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class ProgressBar
41
41
private $ stepWidth ;
42
42
private $ percent = 0.0 ;
43
43
private $ formatLineCount ;
44
- private $ messages ;
44
+ private $ messages = array () ;
45
45
private $ overwrite = true ;
46
46
47
47
private static $ formatters ;
@@ -139,6 +139,16 @@ public static function getFormatDefinition($name)
139
139
return isset (self ::$ formats [$ name ]) ? self ::$ formats [$ name ] : null ;
140
140
}
141
141
142
+ /**
143
+ * Associates a text with a named placeholder.
144
+ *
145
+ * The text is displayed when the progress bar is rendered but only
146
+ * when the corresponding placeholder is part of the custom format line
147
+ * (by wrapping the name with %).
148
+ *
149
+ * @param string $message The text to associate with the placeholder
150
+ * @param string $name The name of the placeholder
151
+ */
142
152
public function setMessage ($ message , $ name = 'message ' )
143
153
{
144
154
$ this ->messages [$ name ] = $ message ;
You can’t perform that action at this time.
0 commit comments