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
d44f4248
Commit
d44f4248
authored
Sep 04, 2014
by
Alexander Makarov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed getting controller description, refactored a bit more
parent
277d8cba
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
Controller.php
framework/console/Controller.php
+7
-5
HelpController.php
framework/console/controllers/HelpController.php
+1
-1
No files found.
framework/console/Controller.php
View file @
d44f4248
...
@@ -291,11 +291,11 @@ class Controller extends \yii\base\Controller
...
@@ -291,11 +291,11 @@ class Controller extends \yii\base\Controller
$class
=
new
\ReflectionClass
(
$this
);
$class
=
new
\ReflectionClass
(
$this
);
}
else
{
}
else
{
$action
=
$this
->
createAction
(
$actionID
);
$action
=
$this
->
createAction
(
$actionID
);
$class
=
new
\ReflectionClass
(
$action
);
}
if
(
$action
instanceof
\yii\base\InlineAction
)
{
if
(
$action
instanceof
\yii\base\InlineAction
)
{
$class
=
new
\ReflectionMethod
(
$this
,
$action
->
actionMethod
);
$class
=
new
\ReflectionMethod
(
$this
,
$action
->
actionMethod
);
}
else
{
$class
=
new
\ReflectionClass
(
$action
);
}
}
}
$docLines
=
preg_split
(
'~\R~'
,
$class
->
getDocComment
());
$docLines
=
preg_split
(
'~\R~'
,
$class
->
getDocComment
());
...
@@ -320,11 +320,13 @@ class Controller extends \yii\base\Controller
...
@@ -320,11 +320,13 @@ class Controller extends \yii\base\Controller
if
(
$actionID
===
null
)
{
if
(
$actionID
===
null
)
{
$class
=
new
\ReflectionClass
(
$this
);
$class
=
new
\ReflectionClass
(
$this
);
}
else
{
}
else
{
$class
=
new
\ReflectionClass
(
$this
->
createAction
(
$actionID
));
$action
=
$this
->
createAction
(
$actionID
);
}
if
(
$action
instanceof
\yii\base\InlineAction
)
{
if
(
$action
instanceof
\yii\base\InlineAction
)
{
$class
=
new
\ReflectionMethod
(
$this
,
$action
->
actionMethod
);
$class
=
new
\ReflectionMethod
(
$this
,
$action
->
actionMethod
);
}
else
{
$class
=
new
\ReflectionClass
(
$action
);
}
}
}
$comment
=
strtr
(
trim
(
preg_replace
(
'/^\s*\**( |\t)?/m'
,
''
,
trim
(
$class
->
getDocComment
(),
'/'
))),
"
\r
"
,
''
);
$comment
=
strtr
(
trim
(
preg_replace
(
'/^\s*\**( |\t)?/m'
,
''
,
trim
(
$class
->
getDocComment
(),
'/'
))),
"
\r
"
,
''
);
...
...
framework/console/controllers/HelpController.php
View file @
d44f4248
...
@@ -40,7 +40,7 @@ class HelpController extends Controller
...
@@ -40,7 +40,7 @@ class HelpController extends Controller
{
{
/**
/**
* Displays available commands or the detailed information
* Displays available commands or the detailed information
* about a particular command.
For example,
* about a particular command.
*
*
* @param string $command The name of the command to show help about.
* @param string $command The name of the command to show help about.
* If not provided, all available commands will be displayed.
* If not provided, all available commands will be displayed.
...
...
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