Skip to content

Commit

Permalink
Changing how command names are parsed to allow multiple levels of nam…
Browse files Browse the repository at this point in the history
…espaces
  • Loading branch information
jwage authored and fabpot committed Apr 23, 2010
1 parent 0c78e9f commit 20cc9b9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Symfony/Components/Console/Application.php
Expand Up @@ -496,7 +496,7 @@ public function findCommand($name)
{
// namespace
$namespace = '';
if (false !== $pos = strpos($name, ':'))
if (false !== $pos = strrpos($name, ':'))
{
$namespace = $this->findNamespace(substr($name, 0, $pos));
$name = substr($name, $pos + 1);
Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Components/Console/Command/Command.php
Expand Up @@ -282,7 +282,7 @@ public function addOption($name, $shortcut = null, $mode = null, $description =
*/
public function setName($name)
{
if (false !== $pos = strpos($name, ':'))
if (false !== $pos = strrpos($name, ':'))
{
$namespace = substr($name, 0, $pos);
$name = substr($name, $pos + 1);
Expand Down

0 comments on commit 20cc9b9

Please sign in to comment.