2014-09-20 14 views

回答

3

這在Symfony 2.5中是不可能的。唯一支持的方法解釋here

我可以建議的唯一的事情就是有一個默認響應的變量。例如:

$default = 'Default response'; 
$questionString = sprintf('What is your response? [%s]', $default); 
$question = new Question($questionString, $default); 
+0

是的,這就是我最終在做的事情...... – MikO 2014-09-21 17:41:41

+0

我已經在Symfony上打開了一個拉請求,所以希望這在未來會很好。 – 2014-09-21 18:23:30

+0

PR是什麼?我沒有[看到一個](https://github.com/symfony/Console/pulls?utf8=%E2%9C%93&q=is%3Apr)。 – bishop 2015-09-03 17:35:50

相關問題