Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yii2
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PSDI Army
yii2
Commits
ea30da6a
Commit
ea30da6a
authored
Aug 07, 2012
by
Qiang Xue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed namespace of core commands.
parent
b074eceb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
6 deletions
+14
-6
Application.php
framework/console/Application.php
+14
-6
No files found.
framework/console/Application.php
View file @
ea30da6a
...
...
@@ -62,6 +62,9 @@ class Application extends \yii\base\Application
*/
public
$enableCoreCommands
=
true
;
/**
* Initialize the application.
*/
public
function
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
if
(
!
isset
(
$this
->
controllers
[
'help'
]))
{
$this
->
controllers
[
'help'
]
=
'yii\console\co
mmand
s\HelpController'
;
$this
->
controllers
[
'help'
]
=
'yii\console\co
ntroller
s\HelpController'
;
}
}
...
...
@@ -106,6 +109,7 @@ class Application extends \yii\base\Application
if
(
$result
===
false
)
{
throw
new
Exception
(
\Yii
::
t
(
'yii'
,
'Unable to resolve the request.'
));
}
/** @var $controller \yii\console\Controller */
list
(
$controller
,
$action
)
=
$result
;
$priorController
=
$this
->
controller
;
$this
->
controller
=
$controller
;
...
...
@@ -144,14 +148,18 @@ class Application extends \yii\base\Application
return
array
(
$route
,
$params
);
}
/**
* Returns the configuration of the built-in commands.
* @return array the configuration of the built-in commands.
*/
public
function
coreCommands
()
{
return
array
(
'message'
=>
'yii\console\co
mmand
s\MessageController'
,
'help'
=>
'yii\console\co
mmand
s\HelpController'
,
'migrate'
=>
'yii\console\co
mmand
s\MigrateController'
,
'shell'
=>
'yii\console\co
mmand
s\ShellController'
,
'app'
=>
'yii\console\co
mmand
s\AppController'
,
'message'
=>
'yii\console\co
ntroller
s\MessageController'
,
'help'
=>
'yii\console\co
ntroller
s\HelpController'
,
'migrate'
=>
'yii\console\co
ntroller
s\MigrateController'
,
'shell'
=>
'yii\console\co
ntroller
s\ShellController'
,
'app'
=>
'yii\console\co
ntroller
s\AppController'
,
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment