public static function Container::underscore in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/dependency-injection/Container.php \Symfony\Component\DependencyInjection\Container::underscore()
A string to underscore.
Parameters
string $id The string to underscore:
Return value
string The underscored string
4 calls to Container::underscore()
- Bundle::getContainerExtension in vendor/
symfony/ http-kernel/ Bundle/ Bundle.php - Returns the bundle's container extension.
- Container::getServiceIds in vendor/
symfony/ dependency-injection/ Container.php - Gets all service ids.
- ContainerTest::testUnderscore in vendor/
symfony/ dependency-injection/ Tests/ ContainerTest.php - @dataProvider dataForTestUnderscore
- Extension::getAlias in vendor/
symfony/ dependency-injection/ Extension/ Extension.php - Returns the recommended alias to use in XML.
File
- vendor/
symfony/ dependency-injection/ Container.php, line 538
Class
- Container
- Container is a dependency injection container.
Namespace
Symfony\Component\DependencyInjectionCode
public static function underscore($id) {
return strtolower(preg_replace(array(
'/([A-Z]+)([A-Z][a-z])/',
'/([a-z\\d])([A-Z])/',
), array(
'\\1_\\2',
'\\1_\\2',
), strtr($id, '_', '.')));
}