if ($tableDefinition !== null &&
$tableDefinition->
hasTableConfig($tableName)) { return new Zend_Db_Table($tableName,
$tableDefinition);
} } // assume the tableName is the class name
if (!
class_exists($tableName)) { try { Zend_Loader::
loadClass($tableName);
} catch (Zend_Exception
$e) { throw new Zend_Db_Table_Row_Exception($e->
getMessage(),
$e->
getCode(),
$e);
} } $options = array
();
if ($referenceTable instanceof Zend_Db_Table_Abstract
) { $options['db'
] =
$referenceTable->
getAdapter();
} if (isset($tableDefinition) &&
$tableDefinition !== null
) { $options[Zend_Db_Table_Abstract::DEFINITION
] =
$tableDefinition;
}