framework/gii/CCodeModel.php
public function class2name($name,$ucwords=true)
	{
		$result=trim(strtolower(str_replace('_',' ',preg_replace('/(?<![A-Z])[A-Z]/', ' \0', $name))));
		return $ucwords ? ucwords($result) : $result;
	}
public function class2name($name,$ucwords=true)
	{
		$result=trim(strtolower(str_replace('_',' ',preg_replace('/(?<![A-Z])[A-Z]/', ' \0', $name))));
		return $ucwords ? ucwords($result) : $result;
	}
public function class2name ( $ name , $ ucwords = true ) { $ result = trim ( strtolower ( str_replace ( '_' , ' ' , preg_replace ( '/(?<![A-Z])[A-Z]/' , ' \0' , $ name ) ) ) ) ; return $ ucwords ? ucwords ( $ result ) : $ result ; }
Converts a class name into space-separated words.
For example, 'PostTag' will be converted as 'Post Tag'.
@param string $name the string to be converted
@param boolean $ucwords whether to capitalize the first letter in each word
@return string the resulting words
Converts a class name into space - separated words . For example PostTag will be converted as Post Tag .