Mercurial > hg > isophonics-drupal-site
view modules/contrib/views_slideshow/src/FormatAddonsName.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
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); } }