Back to Joomla project (class list)

Class InstallerAdapter - list of methods

Abstract adapter for the installer.

Direct known subclasses

Package: Joomla\CMS\Installer
Copyright: (C) 2014 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Installer/InstallerAdapter.php
Project: Joomla

Method Summary

public
(\Joomla\CMS\Installer\Installer $parent, \Joomla\Database\DatabaseDriver $db, array $options = array())

Constructor
Parameters
  • \Joomla\CMS\Installer\Installer $parent Parent object
  • \Joomla\Database\DatabaseDriver $db Database object
  • array $options Configuration Options
Since
  • 3.4
Show source code of this method: __construct Source Code

protected bool
(mixed $packageId)

Check if a package extension allows its child extensions to be uninstalled individually
Parameters
  • int $packageId The extension ID of the package to check
Returns
  • bool
Since
  • 3.7.0
-
  • This method defaults to true to emulate the behavior of 3.6 and earlier which did not support this lookup
Show source code of this method: canUninstallPackageChild Source Code

protected void
()

Method to check if the extension is already present in the database
Returns
  • void
Since
  • 3.4
-
  • \RuntimeException
Show source code of this method: checkExistingExtension Source Code

protected void
()

Method to check if the extension is present in the filesystem, flags the route as update if so
Returns
  • void
Since
  • 3.4
-
  • \RuntimeException
Show source code of this method: checkExtensionInFilesystem Source Code

protected void
()

Method to copy the extension's base files from the `<files>` tag(s) and the manifest file
Returns
  • void
Since
  • 3.4
-
  • \RuntimeException
Show source code of this method: copyBaseFiles Source Code

protected void
()

Method to create the extension root path if necessary
Returns
  • void
Since
  • 3.4
-
  • \RuntimeException
Show source code of this method: createExtensionRoot Source Code

public bool
()

Generic discover_install method for extensions
Returns
  • bool True on success
Since
  • 3.4
Show source code of this method: discover_install Source Code

protected bool
()

Method to handle database transactions for the installer
Returns
  • bool True on success
Since
  • 3.4
-
  • \RuntimeException
Show source code of this method: doDatabaseTransactions Source Code

protected void
(mixed $extension, mixed $source, mixed $base = JPATH_ADMINISTRATOR)

Load language files
Parameters
  • string $extension The name of the extension
  • string $source Path to the extension
  • string $base Base path for the extension language
Returns
  • void
Since
  • 3.4
Show source code of this method: doLoadLanguage Source Code

protected void
()

Method to finalise the installation processing
Returns
  • void
Since
  • 4.0.0
-
  • \RuntimeException
Show source code of this method: finaliseInstall Source Code

protected bool
()

Method to finalise the uninstallation processing
Returns
  • bool
Since
  • 4.0.0
-
  • \RuntimeException
Show source code of this method: finaliseUninstall Source Code

public bool
()

Checks if the adapter supports discover_install
Returns
  • bool
Since
  • 3.4
Show source code of this method: getDiscoverInstallSupported Source Code

public string
(mixed $element = null)

Get the filtered extension element from the manifest
Parameters
  • string $element Optional element name to be converted
Returns
  • string The filtered element
Since
  • 3.4
Show source code of this method: getElement Source Code

public \SimpleXMLElement
()

Get the manifest object.
Returns
  • \SimpleXMLElement Manifest object
Since
  • 3.4
Show source code of this method: getManifest Source Code

public string
()

Get the filtered component name from the manifest
Returns
  • string The filtered name
Since
  • 3.4
Show source code of this method: getName Source Code

public \Joomla\CMS\Installer\Installer
()

Retrieves the parent installer
Returns
  • \Joomla\CMS\Installer\Installer
Since
  • 4.0.0
Show source code of this method: getParent Source Code

public string
()

Get the install route being followed
Returns
  • string The install route
Since
  • 3.4
Show source code of this method: getRoute Source Code

protected string
()

Get the class name for the install adapter script.
Returns
  • string The class name.
Since
  • 3.4
Show source code of this method: getScriptClassName Source Code

public bool|int
()

Generic install method for extensions
Returns
  • bool|int The extension ID on success, boolean false on failure
Since
  • 3.4
Show source code of this method: install Source Code

protected void
()

Method to parse the queries specified in the `<sql>` tags
Returns
  • void
Since
  • 3.4
-
  • \RuntimeException
Show source code of this method: parseQueries Source Code

protected void
()

Method to parse optional tags in the manifest
Returns
  • void
Since
  • 3.1
Show source code of this method: parseOptionalTags Source Code

public void
()

Prepares the adapter for a discover_install task
Returns
  • void
Since
  • 3.4
Show source code of this method: prepareDiscoverInstall Source Code

protected void
()

Removes this extension's files
Returns
  • void
Since
  • 4.0.0
-
  • \RuntimeException
Show source code of this method: removeExtensionFiles Source Code

public \Joomla\CMS\Installer\InstallerAdapter
(mixed $manifest)

Set the manifest object.
Parameters
  • object $manifest The manifest object
Returns
  • \Joomla\CMS\Installer\InstallerAdapter Instance of this class to support chaining
Since
  • 3.4
Show source code of this method: setManifest Source Code

public \Joomla\CMS\Installer\InstallerAdapter
(mixed $route)

Set the install route being followed
Parameters
  • string $route The install route being followed
Returns
  • \Joomla\CMS\Installer\InstallerAdapter Instance of this class to support chaining
Since
  • 3.4
Show source code of this method: setRoute Source Code

protected void
()

Method to do any prechecks and setup the install paths for the extension
Returns
  • void
Since
  • 3.4
Show source code of this method: setupInstallPaths Source Code

protected void
()

Setup the manifest script file for those adapters that use it.
Returns
  • void
Since
  • 3.4
Show source code of this method: setupScriptfile Source Code

protected void
()

Method to do any prechecks and setup the uninstall job
Returns
  • void
Since
  • 4.0.0
Show source code of this method: setupUninstall Source Code

protected void
()

Method to setup the update routine for the adapter
Returns
  • void
Since
  • 3.4
Show source code of this method: setupUpdates Source Code

protected void
()

Method to store the extension to the database
Returns
  • void
Since
  • 3.4
-
  • \RuntimeException
Show source code of this method: storeExtension Source Code

protected bool
(mixed $method)

Executes a custom install script method
Parameters
  • string $method The install method to execute
Returns
  • bool True on success
Since
  • 3.4
-
  • \RuntimeException
Show source code of this method: triggerManifestScript Source Code

public bool
(mixed $id)

Generic update method for extensions
Parameters
  • int $id The extension ID
Returns
  • bool True on success
Since
  • 4.0.0
Show source code of this method: uninstall Source Code

public bool|int
()

Generic update method for extensions
Returns
  • bool|int The extension ID on success, boolean false on failure
Since
  • 3.4
Show source code of this method: update Source Code

Properties Summary

protected string
$changelogurl
Changelog URL of extensions
Since
  • 4.0.0
protected int
$currentExtensionId
ID for the currently installed extension if present
Since
  • 3.4
protected string
$element
The unique identifier for the extension (e.g. mod_login)
Since
  • 3.4
protected \Joomla\CMS\Table\Extension
$extension
Extension object.
Since
  • 3.4
protected string
$extensionMessage
Messages rendered by custom scripts
Since
  • 3.4
public \SimpleXMLElement
$manifest
Copy of the XML manifest file.
Since
  • 3.4
protected string
$manifest_script
A path to the PHP file that the scriptfile declaration in the manifest refers to.
Since
  • 3.4
protected string
$name
Name of the extension
Since
  • 3.4
protected \Joomla\CMS\Installer\Installer
$parent
Installer used with this adapter
Since
  • 4.0.0
protected string
$route
Install function routing
Since
  • 3.4
protected bool
$supportsDiscoverInstall
Flag if the adapter supports discover installs
Since
  • 3.4
protected string
$type
The type of adapter in use
Since
  • 3.4

Tags Summary

Since
3.4