public static function Container::underscore

A string to underscore.

Parameters

string $id The string to underscore:

Return value

string The underscored string

3 calls to Container::underscore()
Bundle::getContainerExtension in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Bundle/Bundle.php
Returns the bundle's container extension.
Container::getServiceIds in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php
Gets all service ids.
Extension::getAlias in drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/DependencyInjection/Extension.php
Returns the recommended alias to use in XML.

File

drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Container.php, line 463

Class

Container
Container is a dependency injection container.

Namespace

Symfony\Component\DependencyInjection

Code

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, '_', '.')));
}