/** * Returns the global Installer object, only creating it if it doesn't already exist. * * @param string $basepath Base Path of the adapters * @param string $classprefix Class prefix of adapters * @param string $adapterfolder Name of folder to append to base path * * @return JInstaller An installer object * * @since 3.1 */ public static function getInstance($basepath = __DIR__, $classprefix = 'JInstallerAdapter', $adapterfolder = 'adapter') { if (!isset(self::$instances[$basepath])) { self::$instances[$basepath] = new JInstaller($basepath, $classprefix, $adapterfolder); // For B/C, we load the first instance into the static $instance container, remove at 4.0 if (!isset(self::$instance)) { self::$instance = self::$instances[$basepath]; } } return self::$instances[$basepath]; }
/** * Returns the global Installer object, only creating it * if it doesn't already exist. * * @return JInstaller An installer object * * @since 11.1 */ public static function getInstance() { if (!isset(self::$instance)) { self::$instance = new JInstaller(); } return self::$instance; }