src/Kunstmaan/GeneratorBundle/Helper/GeneratorUtils.php
public static function cleanPrefix($prefixString)
    {
        $prefixString = trim($prefixString);
        if (empty($prefixString)) {
            return null;
        }

        $result = preg_replace('/_*$/i', '', strtolower($prefixString)) . '_';

        if ($result == '_') {
            return null;
        }

        return $result;
    }
public static function cleanPrefix($prefixString)
    {
        $prefixString = trim($prefixString);
        if (empty($prefixString)) {
            return null;
        }

        $result = preg_replace('/_*$/i', '', strtolower($prefixString)) . '_';

        if ($result == '_') {
            return null;
        }

        return $result;
    }
public static function cleanPrefix ( $ prefixString ) { $ prefixString = trim ( $ prefixString ) ; if ( empty ( $ prefixString ) ) { return null ; } $ result = preg_replace ( '/_*$/i' , '' , strtolower ( $ prefixString ) ) . '_' ; if ( $ result == '_' ) { return null ; } return $ result ; }
Cleans the prefix. Prevents a double underscore from happening.

@param $prefixString

@return string
Cleans the prefix . Prevents a double underscore from happening .