private function _commonGenerate($tableName, $tableInfo)
{
if (count($tableInfo->getColumns()) === 0) {
throw new Exception("Unable to find table or view {$tableName} in " . $this->_dbMetaData->getDbConnection()->getConnectionString() . ".");
} else {
$properties = array();
foreach ($tableInfo->getColumns() as $field => $metadata) {
$properties[] = $this->generateProperty($field, $metadata);
}
$toString = $this->_buildSmartToString($tableInfo);
}
$clasName = $this->_getProperClassName($tableName);
$class = $this->generateClass($properties, $tableName, $clasName, $toString);
$output = $this->_opFile . DIRECTORY_SEPARATOR . $clasName . ".php";
file_put_contents($output, $class);
}