Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
ArrayUtils.php
README.md
Slug.php

README.md

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

You can’t perform that action at this time.