Skip to content

Commit

Permalink
Container::camelize also takes backslashes into consideration
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes authored and fabpot committed Nov 25, 2013
1 parent 222564c commit e30a7d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/DependencyInjection/Container.php
Expand Up @@ -532,7 +532,7 @@ public function isScopeActive($name)
*/
public static function camelize($id)
{
return strtr(ucwords(strtr($id, array('_' => ' ', '.' => '_ '))), array(' ' => ''));
return strtr(ucwords(strtr($id, array('_' => ' ', '.' => '_ ', '\\' => '_ '))), array(' ' => ''));
}

/**
Expand Down
Expand Up @@ -51,6 +51,7 @@ public function dataForTestCamelize()
array('.foo', '_Foo'),
array('foo_', 'Foo'),
array('foo.', 'Foo_'),
array('foo\bar', 'Foo_Bar'),
);
}

Expand Down

0 comments on commit e30a7d0

Please sign in to comment.