You are here

public static function Inflector::classify in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php \Doctrine\Common\Inflector\Inflector::classify()

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 vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php
Camelizes a word. This uses the classify() method and turns the first character to lowercase.

File

vendor/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, "_-", "  ")));
}