Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Container.php

function Container::underscore

A string to underscore.

4 calls to Container::underscore()
AbstractBundle::getContainerExtension in vendor/symfony/http-kernel/Bundle/AbstractBundle.php
Returns the bundle's container extension.
Bundle::getContainerExtension in vendor/symfony/http-kernel/Bundle/Bundle.php
Returns the bundle's container extension.
Extension::getAlias in vendor/symfony/dependency-injection/Extension/Extension.php
Returns the recommended alias to use in XML.
PhpFileLoader::configBuilder in vendor/symfony/dependency-injection/Loader/PhpFileLoader.php

File

vendor/symfony/dependency-injection/Container.php, line 323

Class

Container
Container is a dependency injection container.

Namespace

Symfony\Component\DependencyInjection

Code

public static function underscore(string $id) : string {
    return strtolower(preg_replace([
        '/([A-Z]+)([A-Z][a-z])/',
        '/([a-z\\d])([A-Z])/',
    ], [
        '\\1_\\2',
        '\\1_\\2',
    ], str_replace('_', '.', $id)));
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal