Slugify in Code Igniter |
I'm afraid there are several reason that I think it won't be implemented. Here's a few.
1. You are removing non letters and digits twice. ~[^\pL\d]+~u and [^-\w]+ - This one will remove also "Help"-button, so it becomes Helpbutton, that's not what I wanted. But help-button 2. Setlocale will affect the rest of the code too. And other people on the same process. http://php.net/manual/en/function.setlocale.php 3. Forcing a convert with US standard. Every server should have that charset installed. But no grantee. 4. Forcing a value upon a user. 5. No options, you can't change the separator or leave it out. You can use this one if you want. It uses PHP internal Transliterator Class. https://github.com/ausi/slug-generator http://php.net/manual/pl/class.transliterator.php |
Messages In This Thread |
Slugify in Code Igniter - by imabot - 11-02-2018, 03:05 PM
RE: Slugify in Code Igniter - by jreklund - 11-02-2018, 03:58 PM
|