Skip to content

Latest commit

 

History

History
 
 

Utils

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Phalcon\Utils

Utility functions:

Slug

Creates a slug for the passed string taking into account international characters.

Examples

use Phalcon\Utils\Slug as PhSlug;

// returns: messd-up-text-just-to-stress-test-our-ltl-clean-url-function
echo PhSlug::generate(
    "Mess'd up --text- just (to) stress /test/ ?our! `ltl` \\clean\\ url fun.ction!?->"
);

// returns: perche-l-erba-e-verde
echo PhSlug::generate("Perché l'erba è verde?", "'"); // Italian

The extension iconv must be installed in PHP.

Credits

Matteo Spinelli (http://cubiq.org) php-clean-url-generator