Doctrine


Doctrine\Common\Util\Inflector
/Doctrine/Common/Util/Inflector.php at line 38

Class Inflector

Inflector

public class Inflector

Doctrine inflector has static methods for inflecting text

The methods in these classes are from several different sources collected across several different php projects and several different authors. The original author names and emails are not known

License:
http://www.opensource.org/licenses/lgpl-license.php LGPL
See Also:
www.doctrine-project.org
Since:
1.0
Version:
$Revision: 3189 $
Author:
Konsta Vesterinen
Jonathan H. Wage

Method Summary
static string

camelize(string word)

Camelize a word.

static string

classify(string word)

Convert a word in to the format for a Doctrine class name.

static string

tableize(string word)

Convert word in to the format for a Doctrine table name.

Method Detail

/Doctrine/Common/Util/Inflector.php at line 68

camelize

public static string camelize(string word)

Camelize a word. This uses the classify() method and turns the first character to lowercase

Returns:
$word

/Doctrine/Common/Util/Inflector.php at line 57

classify

public static string classify(string word)

Convert a word in to the format for a Doctrine class name. Converts 'table_name' to 'TableName'

Parameters:
word - Word to classify
Returns:
$word Classified word

/Doctrine/Common/Util/Inflector.php at line 46

tableize

public static string tableize(string word)

Convert word in to the format for a Doctrine table name. Converts 'ModelName' to 'model_name'

Parameters:
word - Word to tableize
Returns:
$word Tableized word

Doctrine