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
4141 private $ stepWidth ;
4242 private $ percent = 0.0 ;
4343 private $ formatLineCount ;
44- private $ messages ;
44+ private $ messages = array () ;
4545 private $ overwrite = true ;
4646
4747 private static $ formatters ;
@@ -139,6 +139,16 @@ public static function getFormatDefinition($name)
139139 return isset (self ::$ formats [$ name ]) ? self ::$ formats [$ name ] : null ;
140140 }
141141
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+ */
142152 public function setMessage ($ message , $ name = 'message ' )
143153 {
144154 $ this ->messages [$ name ] = $ message ;
You can’t perform that action at this time.
0 commit comments