Are you new? Read the FAQ and catch up on!
4k views

Call the slugify/urlize function from Doctrine

If you are using Doctrine, it is possible to call its own function to slugify strings. It is located in the Doctrine_Inflector class:

PHP
  1. $sluggedString = Doctrine_Inflector::urlize(string);
  2.  

­

This is the function Doctrine calls when you set the Sluggable behavior to a class.

Tags: PHP slugify strings Doctrine

Embed: