You are here

protected static function WebformTextHelper::getCamelCaseToSnakeCaseNameConverter in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Utility/WebformTextHelper.php \Drupal\webform\Utility\WebformTextHelper::getCamelCaseToSnakeCaseNameConverter()

Get camel case to snake case converter.

Return value

\Symfony\Component\Serializer\NameConverter\NameConverterInterface Camel case to snake case converter.

File

src/Utility/WebformTextHelper.php, line 25

Class

WebformTextHelper
Provides helper to operate on strings.

Namespace

Drupal\webform\Utility

Code

protected static function getCamelCaseToSnakeCaseNameConverter() {
  if (!isset(static::$converter)) {
    static::$converter = new CamelCaseToSnakeCaseNameConverter();
  }
  return static::$converter;
}