mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Adding Shel::$command back in as it was still being used, oops.
Updating Bakeshell to do its tricks at the correct time.
This commit is contained in:
parent
561067e797
commit
8f0a96d4bb
2 changed files with 10 additions and 3 deletions
|
@ -43,8 +43,8 @@ class BakeShell extends Shell {
|
||||||
* Override loadTasks() to handle paths
|
* Override loadTasks() to handle paths
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function loadTasks() {
|
public function startup() {
|
||||||
parent::loadTasks();
|
parent::startup();
|
||||||
$task = Inflector::classify($this->command);
|
$task = Inflector::classify($this->command);
|
||||||
if (isset($this->{$task}) && !in_array($task, array('Project', 'DbConfig'))) {
|
if (isset($this->{$task}) && !in_array($task, array('Project', 'DbConfig'))) {
|
||||||
if (isset($this->params['connection'])) {
|
if (isset($this->params['connection'])) {
|
||||||
|
@ -188,7 +188,7 @@ class BakeShell extends Shell {
|
||||||
$this->out(__('Bake All complete'));
|
$this->out(__('Bake All complete'));
|
||||||
array_shift($this->args);
|
array_shift($this->args);
|
||||||
} else {
|
} else {
|
||||||
$this->err(__('Bake All could not continue without a valid model'));
|
$this->error(__('Bake All could not continue without a valid model'));
|
||||||
}
|
}
|
||||||
$this->_stop();
|
$this->_stop();
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,6 +68,13 @@ class Shell extends Object {
|
||||||
*/
|
*/
|
||||||
public $params = array();
|
public $params = array();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The command (method/task) that is being run.
|
||||||
|
*
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
public $command;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains arguments parsed from the command line.
|
* Contains arguments parsed from the command line.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Add table
Reference in a new issue