Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Tomáš Trávníček
doctrine-dbal
Commits
efb33a83
Commit
efb33a83
authored
Apr 16, 2010
by
Jonathan H. Wage
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Merging some fixes to Symfony Console component
parent
59f3fe3a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
4 deletions
+26
-4
Application.php
lib/vendor/Symfony/Components/Console/Application.php
+1
-1
Command.php
lib/vendor/Symfony/Components/Console/Command/Command.php
+24
-2
ArgvInput.php
lib/vendor/Symfony/Components/Console/Input/ArgvInput.php
+1
-1
No files found.
lib/vendor/Symfony/Components/Console/Application.php
View file @
efb33a83
...
...
@@ -488,7 +488,7 @@ class Application
{
// namespace
$namespace
=
''
;
if
(
false
!==
$pos
=
strpos
(
$name
,
':'
))
if
(
false
!==
$pos
=
str
r
pos
(
$name
,
':'
))
{
$namespace
=
$this
->
findNamespace
(
substr
(
$name
,
0
,
$pos
));
$name
=
substr
(
$name
,
$pos
+
1
);
...
...
lib/vendor/Symfony/Components/Console/Command/Command.php
View file @
efb33a83
...
...
@@ -276,7 +276,7 @@ class Command
*/
public
function
setName
(
$name
)
{
if
(
false
!==
$pos
=
strpos
(
$name
,
':'
))
if
(
false
!==
$pos
=
str
r
pos
(
$name
,
':'
))
{
$namespace
=
substr
(
$name
,
0
,
$pos
);
$name
=
substr
(
$name
,
$pos
+
1
);
...
...
@@ -375,6 +375,28 @@ class Command
return
$this
->
help
;
}
/**
* Returns the processed help for the command replacing the %command.name% and
* %command.full_name% patterns with the real values dynamically.
*
* @return string The processed help for the command
*/
public
function
getProcessedHelp
()
{
$name
=
$this
->
namespace
.
':'
.
$this
->
name
;
$placeholders
=
array
(
'%command.name%'
,
'%command.full_name%'
);
$replacements
=
array
(
$name
,
$_SERVER
[
'PHP_SELF'
]
.
' '
.
$name
);
return
str_replace
(
$placeholders
,
$replacements
,
$this
->
getHelp
());
}
/**
* Sets the aliases for the command.
*
...
...
@@ -457,7 +479,7 @@ class Command
$messages
[]
=
$this
->
definition
->
asText
();
if
(
$help
=
$this
->
getHelp
())
if
(
$help
=
$this
->
get
Processed
Help
())
{
$messages
[]
=
'<comment>Help:</comment>'
;
$messages
[]
=
' '
.
implode
(
"
\n
"
,
explode
(
"
\n
"
,
$help
))
.
"
\n
"
;
...
...
lib/vendor/Symfony/Components/Console/Input/ArgvInput.php
View file @
efb33a83
...
...
@@ -70,7 +70,7 @@ class ArgvInput extends Input
protected
function
parse
()
{
$this
->
parsed
=
$this
->
tokens
;
while
(
$token
=
array_shift
(
$this
->
parsed
))
while
(
null
!==
(
$token
=
array_shift
(
$this
->
parsed
)
))
{
if
(
'--'
===
substr
(
$token
,
0
,
2
))
{
...
...
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