diff --git a/libraries/cms/installer/adapter/component.php b/libraries/cms/installer/adapter/component.php index 83e42a6d135bb..97b01ab6eaf0e 100644 --- a/libraries/cms/installer/adapter/component.php +++ b/libraries/cms/installer/adapter/component.php @@ -1334,14 +1334,3 @@ protected function _createAdminMenuItem(array &$data, $parentId) return $table->id; } } - -/** - * Deprecated class placeholder. You should use JInstallerAdapterComponent instead. - * - * @since 3.1 - * @deprecated 4.0 - * @codeCoverageIgnore - */ -class JInstallerComponent extends JInstallerAdapterComponent -{ -} diff --git a/libraries/cms/installer/adapter/file.php b/libraries/cms/installer/adapter/file.php index f87c811156c24..1341a515c04ba 100644 --- a/libraries/cms/installer/adapter/file.php +++ b/libraries/cms/installer/adapter/file.php @@ -637,14 +637,3 @@ public function refreshManifestCache() } } } - -/** - * Deprecated class placeholder. You should use JInstallerAdapterFile instead. - * - * @since 3.1 - * @deprecated 4.0 - * @codeCoverageIgnore - */ -class JInstallerFile extends JInstallerAdapterFile -{ -} diff --git a/libraries/cms/installer/adapter/language.php b/libraries/cms/installer/adapter/language.php index b403abec808b1..40efc4a34761f 100644 --- a/libraries/cms/installer/adapter/language.php +++ b/libraries/cms/installer/adapter/language.php @@ -703,14 +703,3 @@ public function refreshManifestCache() } } } - -/** - * Deprecated class placeholder. You should use JInstallerAdapterLanguage instead. - * - * @since 3.1 - * @deprecated 4.0 - * @codeCoverageIgnore - */ -class JInstallerLanguage extends JInstallerAdapterLanguage -{ -} diff --git a/libraries/cms/installer/adapter/library.php b/libraries/cms/installer/adapter/library.php index a124903438c03..0b6fc0d0c190d 100644 --- a/libraries/cms/installer/adapter/library.php +++ b/libraries/cms/installer/adapter/library.php @@ -504,14 +504,3 @@ public function refreshManifestCache() } } } - -/** - * Deprecated class placeholder. You should use JInstallerAdapterLibrary instead. - * - * @since 3.1 - * @deprecated 4.0 - * @codeCoverageIgnore - */ -class JInstallerLibrary extends JInstallerAdapterLibrary -{ -} diff --git a/libraries/cms/installer/adapter/module.php b/libraries/cms/installer/adapter/module.php index ecf8a08f9b9bb..d88a86e9fd29f 100644 --- a/libraries/cms/installer/adapter/module.php +++ b/libraries/cms/installer/adapter/module.php @@ -775,14 +775,3 @@ protected function _rollback_module($arg) } } } - -/** - * Deprecated class placeholder. You should use JInstallerAdapterModule instead. - * - * @since 3.1 - * @deprecated 4.0 - * @codeCoverageIgnore - */ -class JInstallerModule extends JInstallerAdapterModule -{ -} diff --git a/libraries/cms/installer/adapter/package.php b/libraries/cms/installer/adapter/package.php index fbb83761fe0f1..46f999e856b55 100644 --- a/libraries/cms/installer/adapter/package.php +++ b/libraries/cms/installer/adapter/package.php @@ -689,14 +689,3 @@ public function refreshManifestCache() } } } - -/** - * Deprecated class placeholder. You should use JInstallerAdapterPackage instead. - * - * @since 3.1 - * @deprecated 4.0 - * @codeCoverageIgnore - */ -class JInstallerPackage extends JInstallerAdapterPackage -{ -} diff --git a/libraries/cms/installer/adapter/plugin.php b/libraries/cms/installer/adapter/plugin.php index 1865100ade9da..b723f14180474 100644 --- a/libraries/cms/installer/adapter/plugin.php +++ b/libraries/cms/installer/adapter/plugin.php @@ -305,18 +305,9 @@ protected function parseOptionalTags() */ public function prepareDiscoverInstall() { - $client = JApplicationHelper::getClientInfo($this->extension->client_id); - $basePath = $client->path . '/plugins/' . $this->extension->folder; - - if (is_dir($basePath . '/' . $this->extension->element)) - { - $manifestPath = $basePath . '/' . $this->extension->element . '/' . $this->extension->element . '.xml'; - } - else - { - // @deprecated 4.0 - This path supports Joomla! 1.5 plugin folder layouts - $manifestPath = $basePath . '/' . $this->extension->element . '.xml'; - } + $client = JApplicationHelper::getClientInfo($this->extension->client_id); + $basePath = $client->path . '/plugins/' . $this->extension->folder; + $manifestPath = $basePath . '/' . $this->extension->element . '/' . $this->extension->element . '.xml'; $this->parent->manifest = $this->parent->isManifest($manifestPath); $this->parent->setPath('manifest', $manifestPath); @@ -723,14 +714,3 @@ public function refreshManifestCache() } } } - -/** - * Deprecated class placeholder. You should use JInstallerAdapterPlugin instead. - * - * @since 3.1 - * @deprecated 4.0 - * @codeCoverageIgnore - */ -class JInstallerPlugin extends JInstallerAdapterPlugin -{ -} diff --git a/libraries/cms/installer/adapter/template.php b/libraries/cms/installer/adapter/template.php index b24ae7431e092..df53a44564706 100644 --- a/libraries/cms/installer/adapter/template.php +++ b/libraries/cms/installer/adapter/template.php @@ -611,14 +611,3 @@ public function refreshManifestCache() } } } - -/** - * Deprecated class placeholder. You should use JInstallerAdapterTemplate instead. - * - * @since 3.1 - * @deprecated 4.0 - * @codeCoverageIgnore - */ -class JInstallerTemplate extends JInstallerAdapterTemplate -{ -} diff --git a/libraries/cms/installer/installer.php b/libraries/cms/installer/installer.php index 07f8730eb4a18..9129223ca9714 100644 --- a/libraries/cms/installer/installer.php +++ b/libraries/cms/installer/installer.php @@ -518,7 +518,7 @@ public function discover_install($eid = null) $type = $this->extension->type; $params = array('extension' => $this->extension, 'route' => 'discover_install'); - $adapter = $this->getAdapter($type, $params); + $adapter = $this->loadAdapter($type, $params); if (!is_object($adapter)) { @@ -596,15 +596,16 @@ public function discover_install($eid = null) */ public function discover() { - $this->loadAllAdapters(); $results = array(); - foreach ($this->_adapters as $adapter) + foreach ($this->getAdapters() as $adapter) { + $instance = $this->loadAdapter($adapter); + // Joomla! 1.5 installation adapter legacy support - if (method_exists($adapter, 'discover')) + if (method_exists($instance, 'discover')) { - $tmp = $adapter->discover(); + $tmp = $instance->discover(); // If its an array and has entries if (is_array($tmp) && count($tmp)) @@ -685,19 +686,18 @@ public function update($path = null) /** * Package uninstallation method * - * @param string $type Package type - * @param mixed $identifier Package identifier for adapter - * @param integer $cid Application ID; deprecated in 1.6 + * @param string $type Package type + * @param mixed $identifier Package identifier for adapter * * @return boolean True if successful * * @since 3.1 */ - public function uninstall($type, $identifier, $cid = 0) + public function uninstall($type, $identifier) { $params = array('extension' => $this->extension, 'route' => 'uninstall'); - $adapter = $this->getAdapter($type, $params); + $adapter = $this->loadAdapter($type, $params); if (!is_object($adapter)) { @@ -755,7 +755,7 @@ public function refreshManifestCache($eid) } // Fetch the adapter - $adapter = $this->getAdapter($this->extension->type); + $adapter = $this->loadAdapter($this->extension->type); if (!is_object($adapter)) { @@ -812,7 +812,7 @@ public function setupInstall($route = 'install', $returnAdapter = false) $params = array('route' => $route, 'manifest' => $this->getManifest()); // Load the adapter - $adapter = $this->getAdapter($type, $params); + $adapter = $this->loadAdapter($type, $params); if ($returnAdapter) { @@ -2216,42 +2216,15 @@ public static function parseXMLInstallFile($path) return $data; } - /** - * Fetches an adapter and adds it to the internal storage if an instance is not set - * while also ensuring its a valid adapter name - * - * @param string $name Name of adapter to return - * @param array $options Adapter options - * - * @return JInstallerAdapter - * - * @since 3.4 - * @deprecated 4.0 The internal adapter cache will no longer be supported, - * use loadAdapter() to fetch an adapter instance - */ - public function getAdapter($name, $options = array()) - { - $this->getAdapters($options); - - if (!$this->setAdapter($name, $this->_adapters[$name])) - { - return false; - } - - return $this->_adapters[$name]; - } - /** * Gets a list of available install adapters. * * @param array $options An array of options to inject into the adapter * @param array $custom Array of custom install adapters * - * @return array An array of available install adapters. + * @return string[] An array of the class names of available install adapters. * * @since 3.4 - * @note As of 4.0, this method will only return the names of available adapters and will not - * instantiate them and store to the $_adapters class var. */ public function getAdapters($options = array(), array $custom = array()) { @@ -2285,7 +2258,7 @@ public function getAdapters($options = array(), array $custom = array()) } } - $this->_adapters[$name] = $this->loadAdapter($name, $options); + $adapters[] = str_ireplace('.php', '', $fileName); } // Add any custom adapters if specified @@ -2303,11 +2276,11 @@ public function getAdapters($options = array(), array $custom = array()) continue; } - $this->_adapters[$name] = $this->loadAdapter($name, $options); + $adapters[] = str_ireplace('.php', '', $fileName); } } - return $this->_adapters; + return $adapters; } /** @@ -2327,22 +2300,7 @@ public function loadAdapter($adapter, $options = array()) if (!class_exists($class)) { - // @deprecated 4.0 - The adapter should be autoloaded or manually included by the caller - $path = $this->_basepath . '/' . $this->_adapterfolder . '/' . $adapter . '.php'; - - // Try to load the adapter object - if (!file_exists($path)) - { - throw new InvalidArgumentException(sprintf('The %s install adapter does not exist.', $adapter)); - } - - // Try once more to find the class - require_once $path; - - if (!class_exists($class)) - { - throw new InvalidArgumentException(sprintf('The %s install adapter does not exist.', $adapter)); - } + throw new InvalidArgumentException(sprintf('The %s install adapter does not exist.', $adapter)); } // Ensure the adapter type is part of the options array @@ -2356,20 +2314,4 @@ public function loadAdapter($adapter, $options = array()) return new $class($this, $this->getDbo(), $options); } - - /** - * Loads all adapters. - * - * @param array $options Adapter options - * - * @return void - * - * @since 3.4 - * @deprecated 4.0 Individual adapters should be instantiated as needed - * @note This method is serving as a proxy of the legacy JAdapter API into the preferred API - */ - public function loadAllAdapters($options = array()) - { - $this->getAdapters($options); - } }