function SampleTableConfig(&$db) { $tbl_key = 'config_name'; $tbl_suffix = 'config'; $this->set('_suffix', $tbl_suffix); $name = "sample"; parent::__construct("#__{$name}_{$tbl_suffix}", $tbl_key, $db); }
/** * Could this be abstracted into the base? * * @param $db * @return unknown_type */ function SampleTableTools(&$db) { if (version_compare(JVERSION, '1.6.0', 'ge')) { // Joomla! 1.6+ code here $tbl_key = 'extension_id'; $tbl_suffix = 'extensions'; } else { // Joomla! 1.5 code here $tbl_key = 'id'; $tbl_suffix = 'plugins'; } $this->set('_suffix', $tbl_suffix); $name = "sample"; parent::__construct("#__{$tbl_suffix}", $tbl_key, $db); }