protected function _modelClassToLabel()
{
/* Get the latest token. */
if (preg_match('/(\\w+)(?:Model)?$/', $this->getModelClass(), $reg)) {
$label = @$reg[1];
if (!$label) {
throw new Exception('Table name error');
}
/* convert blah_blah to BlahBlah */
return ucfirst(preg_replace('/[_]/', ' ', $label));
}
}