You are here

public static function Container::camelize in Service Container 7

Same name in this branch
  1. 7 src/DependencyInjection/Container.php \Drupal\service_container\DependencyInjection\Container::camelize()
  2. 7 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Container.php \Symfony\Component\DependencyInjection\Container::camelize()
Same name and namespace in other branches
  1. 7.2 src/DependencyInjection/Container.php \Drupal\service_container\DependencyInjection\Container::camelize()

Camelizes a string.

Parameters

$name: The string to camelize.

Return value

string The camelized string.

File

src/DependencyInjection/Container.php, line 72
Contains \Drupal\service_container\DependencyInjection\Container

Class

Container
Container is a DI container that provides services to users of the class.

Namespace

Drupal\service_container\DependencyInjection

Code

public static function camelize($name) {
  return strtr(ucwords(strtr($name, array(
    '_' => ' ',
    '\\' => '_ ',
  ))), array(
    ' ' => '',
  ));
}