Inflector.php
public static function underscore($text) {
        $pregRule = '#[A-Z]+#';
        $text = preg_replace_callback($pregRule, function($match) { return "_" . strtolower($match[0]); }, $text);

        return self::slugify($text, '_');
    }
public static function underscore($text) {
        $pregRule = '#[A-Z]+#';
        $text = preg_replace_callback($pregRule, function($match) { return "_" . strtolower($match[0]); }, $text);

        return self::slugify($text, '_');
    }
public static function underscore ( $ text ) { $ pregRule = '#[A-Z]+#' ; $ text = preg_replace_callback ( $ pregRule , function ( $ match ) { return "_" . strtolower ( $ match [ 0 ] ) ; } , $ text ) ; return self :: slugify ( $ text , '_' ) ; }
Convert to underscored text

@param $text
@return string
Convert to underscored text