mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-25 19:20:29 +08:00
Fixed namespace of core commands.
This commit is contained in:
@@ -62,6 +62,9 @@ class Application extends \yii\base\Application
|
|||||||
*/
|
*/
|
||||||
public $enableCoreCommands = true;
|
public $enableCoreCommands = true;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Initialize the application.
|
||||||
|
*/
|
||||||
public function init()
|
public function init()
|
||||||
{
|
{
|
||||||
parent::init();
|
parent::init();
|
||||||
@@ -74,7 +77,7 @@ class Application extends \yii\base\Application
|
|||||||
}
|
}
|
||||||
// ensure we have the 'help' command so that we can list the available commands
|
// ensure we have the 'help' command so that we can list the available commands
|
||||||
if (!isset($this->controllers['help'])) {
|
if (!isset($this->controllers['help'])) {
|
||||||
$this->controllers['help'] = 'yii\console\commands\HelpController';
|
$this->controllers['help'] = 'yii\console\controllers\HelpController';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,6 +109,7 @@ class Application extends \yii\base\Application
|
|||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
throw new Exception(\Yii::t('yii', 'Unable to resolve the request.'));
|
throw new Exception(\Yii::t('yii', 'Unable to resolve the request.'));
|
||||||
}
|
}
|
||||||
|
/** @var $controller \yii\console\Controller */
|
||||||
list($controller, $action) = $result;
|
list($controller, $action) = $result;
|
||||||
$priorController = $this->controller;
|
$priorController = $this->controller;
|
||||||
$this->controller = $controller;
|
$this->controller = $controller;
|
||||||
@@ -144,14 +148,18 @@ class Application extends \yii\base\Application
|
|||||||
return array($route, $params);
|
return array($route, $params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the configuration of the built-in commands.
|
||||||
|
* @return array the configuration of the built-in commands.
|
||||||
|
*/
|
||||||
public function coreCommands()
|
public function coreCommands()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
'message' => 'yii\console\commands\MessageController',
|
'message' => 'yii\console\controllers\MessageController',
|
||||||
'help' => 'yii\console\commands\HelpController',
|
'help' => 'yii\console\controllers\HelpController',
|
||||||
'migrate' => 'yii\console\commands\MigrateController',
|
'migrate' => 'yii\console\controllers\MigrateController',
|
||||||
'shell' => 'yii\console\commands\ShellController',
|
'shell' => 'yii\console\controllers\ShellController',
|
||||||
'app' => 'yii\console\commands\AppController',
|
'app' => 'yii\console\controllers\AppController',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user