You are here

public static function Inflector::classify in Plug 7

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

Parameters

string $word The word to classify.:

Return value

string The classified word.

1 call to Inflector::classify()
Inflector::camelize in lib/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php
Camelizes a word. This uses the classify() method and turns the first character to lowercase.

File

lib/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php, line 222

Class

Inflector
Doctrine inflector has static methods for inflecting text.

Namespace

Doctrine\Common\Inflector

Code

public static function classify($word) {
  return str_replace(" ", "", ucwords(strtr($word, "_-", "  ")));
}