Mercurial > hg > isophonics-drupal-site
view modules/contrib/views_slideshow/src/FormatAddonsName.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | c69a71b4f40f |
children |
line wrap: on
line source
<?php namespace Drupal\views_slideshow; /** * Provides a class to manipulate addons names. */ class FormatAddonsName implements FormatAddonsNameInterface { /** * Format callback to move from underscore separated words to camelCase. */ public function format($subject) { return preg_replace_callback('/_(.?)/', function ($matches) { if (isset($matches[1])) { return strtoupper($matches[1]); } }, $subject); } }