Mercurial > hg > isophonics-drupal-site
view modules/contrib/views_slideshow/src/FormatAddonsName.php @ 9:1fc0ff908d1f
Add another data file
author | Chris Cannam |
---|---|
date | Mon, 05 Feb 2018 12:34:32 +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); } }