mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 18:46:17 +00:00
Implementing non-interactive mode in console scripts
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6470 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
0572926d49
commit
3bc622b250
1 changed files with 4 additions and 0 deletions
|
@ -295,7 +295,11 @@ class Shell extends Object {
|
|||
* @access public
|
||||
*/
|
||||
function in($prompt, $options = null, $default = null) {
|
||||
if (!$this->interactive) {
|
||||
return $default;
|
||||
}
|
||||
$in = $this->Dispatch->getInput($prompt, $options, $default);
|
||||
|
||||
if ($options && is_string($options)) {
|
||||
if (strpos($options, ',')) {
|
||||
$options = explode(',', $options);
|
||||
|
|
Loading…
Add table
Reference in a new issue