mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding fix for #2877, adds quit option in bake.php
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5412 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
f792004469
commit
d2ed329e76
1 changed files with 6 additions and 2 deletions
|
@ -54,8 +54,9 @@ class BakeShell extends Shell {
|
|||
$this->out('[M]odel');
|
||||
$this->out('[V]iew');
|
||||
$this->out('[C]ontroller');
|
||||
$this->out('[Q]uit');
|
||||
|
||||
$classToBake = strtoupper($this->in('What would you like to Bake?', array('M', 'V', 'C')));
|
||||
$classToBake = strtoupper($this->in('What would you like to Bake?', array('M', 'V', 'C', 'Q')));
|
||||
switch($classToBake) {
|
||||
case 'M':
|
||||
$this->Model->execute();
|
||||
|
@ -66,6 +67,9 @@ class BakeShell extends Shell {
|
|||
case 'C':
|
||||
$this->Controller->execute();
|
||||
break;
|
||||
case 'Q':
|
||||
exit(0);
|
||||
break;
|
||||
default:
|
||||
$this->out('You have made an invalid selection. Please choose a type of class to Bake by entering M, V, or C.');
|
||||
}
|
||||
|
@ -100,4 +104,4 @@ class BakeShell extends Shell {
|
|||
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in a new issue