src/Model/SlugModel.php
private function vulgarize($string)
    {
        return trim(
            preg_replace(
                '/(-+)/',
                '-',
                preg_replace(
                    '/([^a-z0-9-]*)/',
                    '',
                    preg_replace(
                        '/((\s|\.|\'|\/)+)/',
                        '-',
                        html_entity_decode(
                            preg_replace(
                                '/&(a|o)elig;/',
                                '$1e',
                                preg_replace(
                                    '/&([a-z])(uml|acute|grave|circ|tilde|ring|cedil|slash);/',
                                    '$1',
                                    strtolower(
                                        htmlentities(
                                            $string,
                                            ENT_COMPAT,
                                            'utf-8'
                                        )
                                    )
                                )
                            ),
                            ENT_COMPAT,
                            'utf-8'
                        )
                    )
                )
            ),
            '-'
        );
    }
private function vulgarize($string)
    {
        return trim(
            preg_replace(
                '/(-+)/',
                '-',
                preg_replace(
                    '/([^a-z0-9-]*)/',
                    '',
                    preg_replace(
                        '/((\s|\.|\'|\/)+)/',
                        '-',
                        html_entity_decode(
                            preg_replace(
                                '/&(a|o)elig;/',
                                '$1e',
                                preg_replace(
                                    '/&([a-z])(uml|acute|grave|circ|tilde|ring|cedil|slash);/',
                                    '$1',
                                    strtolower(
                                        htmlentities(
                                            $string,
                                            ENT_COMPAT,
                                            'utf-8'
                                        )
                                    )
                                )
                            ),
                            ENT_COMPAT,
                            'utf-8'
                        )
                    )
                )
            ),
            '-'
        );
    }
private function vulgarize ( $ string ) { return trim ( preg_replace ( '/(-+)/' , '-' , preg_replace ( '/([^a-z0-9-]*)/' , '' , preg_replace ( '/((\s|\.|\'|\/)+)/' , '-' , html_entity_decode ( preg_replace ( '/&(a|o)elig;/' , '$1e' , preg_replace ( '/&([a-z])(uml|acute|grave|circ|tilde|ring|cedil|slash);/' , '$1' , strtolower ( htmlentities ( $ string , ENT_COMPAT , 'utf-8' ) ) ) ) , ENT_COMPAT , 'utf-8' ) ) ) ) , '-' ) ; }
Makes a string URL-compatible

@param string $string String to transform

@return string
Makes a string URL - compatible