* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace AppBundle\Utils; /** * FIXME CAN BE REMOVED * * This class is used to provide an example of integrating simple classes as * services into a Symfony application. * * @author Ryan Weaver * @author Javier Eguiluz */ class Slugger { /** * @param string $string * * @return string */ public function slugify($string) { return trim(preg_replace('/[^a-z0-9]+/', '-', strtolower(strip_tags($string))), '-'); } }