You are here

public static function IsotopeController::snakeToCamel in Isotope (with Masonry and Packery) 8

Convert a snake_case string to a camelCase string.

Parameters

string $raw: String in snake_case.

Return value

string String in camelCase.

1 call to IsotopeController::snakeToCamel()
Presentation::toJSON in src/Entity/Presentation.php
Convert a presentation into a JSON representation.

File

src/Controller/IsotopeController.php, line 81
Contains \Drupal\isotope\Controller\IsotopeController.

Class

IsotopeController
Controller routines for admin block routes.

Namespace

Drupal\isotope\Controller

Code

public static function snakeToCamel($raw) {
  return lcfirst(str_replace(' ', '', ucwords(str_replace([
    '-',
    '_',
  ], ' ', $raw))));
}