public function __construct($table, $connection)
{
$this->_connection = $connection;
if (is_string($table)) {
$this->setTableName($table);
} else {
if ($table instanceof TDbTableInfo) {
$this->setTableInfo($table);
} else {
throw new TDbException('dbtablegateway_invalid_table_info');
}
}
}