public static function Container::camelize

Camelizes a string.

Parameters

string $id A string to camelize:

Return value

string The camelized string

2 calls to Container::camelize()
PhpDumper::addService in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Adds a service
PhpDumper::addServiceAlias in drupal/core/vendor/symfony/dependency-injection/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php
Adds a service alias.

File

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

Class

Container
Container is a dependency injection container.

Namespace

Symfony\Component\DependencyInjection

Code

public static function camelize($id) {
  return preg_replace_callback('/(^|_|\\.)+(.)/', function ($match) {
    return ('.' === $match[1] ? '_' : '') . strtoupper($match[2]);
  }, $id);
}