function getInstance($type = 'system', $table = null, $component = null) { if (is_null($component)) { $app = BabioonFactory::getApplication(); $scope = substr($app->scope, 4); } else { if (strpos($component, 'com_') !== false) { $scope = substr($component, 4); } else { $scope = $component; } } $index = $scope . '_' . $type; if (!isset(self::$instances[$index])) { if (is_null($table)) { $table = '#__' . $scope; } self::$instances[$index] = new BabioonConfig($type, $table, $scope); } return self::$instances[$index]; }