X-Git-Url: https://git.rapsys.eu/userbundle/blobdiff_plain/bbdd05e4ae572d5a4fe7d676e2cc361387220f74..e1e170263366dc7d54027e84a54809e7860603ab:/Utils/Slugger.php?ds=sidebyside diff --git a/Utils/Slugger.php b/Utils/Slugger.php index e781fa5..8422f2c 100644 --- a/Utils/Slugger.php +++ b/Utils/Slugger.php @@ -106,7 +106,7 @@ class Slugger { function slug(string $string): string { //Use Transliterator if available if (class_exists('Transliterator')) { - $trans = Transliterator::create('Any-Latin; Latin-ASCII; Lower()'); + $trans = \Transliterator::create('Any-Latin; Latin-ASCII; Lower()'); return preg_replace(['/[^a-zA-Z0-9]+/', '/(^-+|-+$)/'], ['-', ''], $trans->transliterate($string)); } return preg_replace('/[\/_|+ -]+/', '-', strtolower(trim(preg_replace('/[^a-zA-Z0-9\/_|+ -]/', '', str_replace(['\'', '"'], ' ', iconv('UTF-8', 'ASCII//TRANSLIT', $string))), '-')));