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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
10 deletions
+12
-10
Controller.php
framework/console/Controller.php
+11
-9
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
$class
=
new
\ReflectionClass
(
$this
);
}
else
{
$action
=
$this
->
createAction
(
$actionID
);
$class
=
new
\ReflectionClass
(
$action
);
}
if
(
$action
instanceof
\yii\base\InlineAction
)
{
$class
=
new
\ReflectionMethod
(
$this
,
$action
->
actionMethod
);
if
(
$action
instanceof
\yii\base\InlineAction
)
{
$class
=
new
\ReflectionMethod
(
$this
,
$action
->
actionMethod
);
}
else
{
$class
=
new
\ReflectionClass
(
$action
);
}
}
$docLines
=
preg_split
(
'~\R~'
,
$class
->
getDocComment
());
...
...
@@ -320,11 +320,13 @@ class Controller extends \yii\base\Controller
if
(
$actionID
===
null
)
{
$class
=
new
\ReflectionClass
(
$this
);
}
else
{
$class
=
new
\ReflectionClass
(
$this
->
createAction
(
$actionID
));
}
$action
=
$this
->
createAction
(
$actionID
);
if
(
$action
instanceof
\yii\base\InlineAction
)
{
$class
=
new
\ReflectionMethod
(
$this
,
$action
->
actionMethod
);
if
(
$action
instanceof
\yii\base\InlineAction
)
{
$class
=
new
\ReflectionMethod
(
$this
,
$action
->
actionMethod
);
}
else
{
$class
=
new
\ReflectionClass
(
$action
);
}
}
$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
{
/**
* 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.
* 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