WP_CLI

Inflector::classify()public staticWP-CLI 1.0

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

Method of the class: Inflector{}

No Hooks.

Return

String. The classified word.

Usage

$result = Inflector::classify( $word );
$word(string) (required)
The word to classify.

Inflector::classify() code WP-CLI 2.8.0-alpha

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