[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
Joomla! Content Management System
Copyright: | (C) 2005 Open Source Matters, Inc. |
License: | GNU General Public License version 2 or later; see LICENSE.txt |
File Size: | 2429 lines (78 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
Installer:: (44 methods):
__construct()
getInstance()
splitSql()
isOverwrite()
setOverwrite()
getRedirectUrl()
setRedirectUrl()
isPackageUninstall()
setPackageUninstall()
isUpgrade()
setUpgrade()
getManifest()
getPath()
setPath()
pushStep()
abort()
install()
discover_install()
discover()
update()
uninstall()
refreshManifestCache()
setupInstall()
parseQueries()
parseSQLFiles()
setSchemaVersion()
parseSchemaUpdates()
updateSchemaTable()
parseFiles()
parseLanguages()
parseMedia()
getParams()
copyFiles()
removeFiles()
copyManifest()
findManifest()
isManifest()
generateManifestCache()
cleanDiscoveredExtension()
findDeletedFiles()
loadMD5Sum()
parseXMLInstallFile()
getAdapters()
loadAdapter()
__construct($basepath = __DIR__, $classprefix = '\\Joomla\\CMS\\Installer\\Adapter', $adapterfolder = 'Adapter') X-Ref |
Constructor 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 |
getInstance($basepath = __DIR__, $classprefix = '\\Joomla\\CMS\\Installer\\Adapter', $adapterfolder = 'Adapter') X-Ref |
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: Installer An installer object |
splitSql(?string $sql) X-Ref |
Splits a string of multiple queries into an array of individual queries. This is different than DatabaseDriver::splitSql. It supports the special CAN FAIL comment marker which indicates that a SQL statement could fail without raising an error during the installation. param: string|null $sql Input SQL string with which to split into individual queries. return: array |
isOverwrite() X-Ref |
Get the allow overwrite switch return: boolean Allow overwrite switch |
setOverwrite($state = false) X-Ref |
Set the allow overwrite switch param: boolean $state Overwrite switch state return: boolean True it state is set, false if it is not |
getRedirectUrl() X-Ref |
Get the redirect location return: string Redirect location (or null) |
setRedirectUrl($newurl) X-Ref |
Set the redirect location param: string $newurl New redirect location return: void |
isPackageUninstall() X-Ref |
Get whether this installer is uninstalling extensions which are part of a package return: boolean |
setPackageUninstall($uninstall) X-Ref |
Set whether this installer is uninstalling extensions which are part of a package param: boolean $uninstall True if a package triggered the uninstall, false otherwise return: void |
isUpgrade() X-Ref |
Get the upgrade switch return: boolean |
setUpgrade($state = false) X-Ref |
Set the upgrade switch param: boolean $state Upgrade switch state return: boolean True if upgrade, false otherwise |
getManifest() X-Ref |
Get the installation manifest object return: \SimpleXMLElement Manifest object |
getPath($name, $default = null) X-Ref |
Get an installer path by name param: string $name Path name param: string $default Default value return: string Path |
setPath($name, $value) X-Ref |
Sets an installer path by name param: string $name Path name param: string $value Path return: void |
pushStep($step) X-Ref |
Pushes a step onto the installer stack for rolling back steps param: array $step Installer step return: void |
abort($msg = null, $type = null) X-Ref |
Installation abort method param: string $msg Abort message from the installer param: string $type Package type if defined return: boolean True if successful |
install($path = null) X-Ref |
Package installation method param: string $path Path to package source folder return: boolean True if successful |
discover_install($eid = null) X-Ref |
Discovered package installation method param: integer $eid Extension ID return: boolean True if successful |
discover() X-Ref |
Extension discover method Asks each adapter to find extensions return: InstallerExtension[] |
update($path = null) X-Ref |
Package update method param: string $path Path to package source folder return: boolean True if successful |
uninstall($type, $identifier) X-Ref |
Package uninstallation method param: string $type Package type param: mixed $identifier Package identifier for adapter return: boolean True if successful |
refreshManifestCache($eid) X-Ref |
Refreshes the manifest cache stored in #__extensions param: integer $eid Extension ID return: boolean |
setupInstall($route = 'install', $returnAdapter = false) X-Ref |
Prepare for installation: this method sets the installation directory, finds and checks the installation file and verifies the installation type. param: string $route The install route being followed param: boolean $returnAdapter Flag to return the instantiated adapter return: boolean|InstallerAdapter InstallerAdapter object if explicitly requested otherwise boolean |
parseQueries(\SimpleXMLElement $element) X-Ref |
Backward compatible method to parse through a queries element of the installation manifest file and take appropriate action. param: \SimpleXMLElement $element The XML node to process return: mixed Number of queries processed or False on error |
parseSQLFiles($element) X-Ref |
Method to extract the name of a discreet installation sql file from the installation manifest file. param: object $element The XML node to process return: mixed Number of queries processed or False on error |
setSchemaVersion(\SimpleXMLElement $schema, $eid) X-Ref |
Set the schema version for an extension by looking at its latest update param: \SimpleXMLElement $schema Schema Tag param: integer $eid Extension ID return: void |
parseSchemaUpdates(\SimpleXMLElement $schema, $eid) X-Ref |
Method to process the updates for an item param: \SimpleXMLElement $schema The XML node to process param: integer $eid Extension Identifier return: boolean|int Number of SQL updates executed; false on failure. |
updateSchemaTable(int $eid, string $version, bool $update = false) X-Ref |
Update the schema table with the latest version param: int $eid Extension ID. param: string $version Latest schema version ID. param: boolean $update Should I run an update against an existing record or insert a new one? return: void |
parseFiles(\SimpleXMLElement $element, $cid = 0, $oldFiles = null, $oldMD5 = null) X-Ref |
Method to parse through a files element of the installation manifest and take appropriate action. param: \SimpleXMLElement $element The XML node to process param: integer $cid Application ID of application to install to param: array $oldFiles List of old files (SimpleXMLElement's) param: array $oldMD5 List of old MD5 sums (indexed by filename with value as MD5) return: boolean True on success |
parseLanguages(\SimpleXMLElement $element, $cid = 0) X-Ref |
Method to parse through a languages element of the installation manifest and take appropriate action. param: \SimpleXMLElement $element The XML node to process param: integer $cid Application ID of application to install to return: boolean True on success |
parseMedia(\SimpleXMLElement $element, $cid = 0) X-Ref |
Method to parse through a media element of the installation manifest and take appropriate action. param: \SimpleXMLElement $element The XML node to process param: integer $cid Application ID of application to install to return: boolean True on success |
getParams() X-Ref |
Method to parse the parameters of an extension, build the JSON string for its default parameters, and return the JSON string. return: string JSON string of parameter values |
copyFiles($files, $overwrite = null) X-Ref |
Copyfiles Copy files from source directory to the target directory param: array $files Array with filenames param: boolean $overwrite True if existing files can be replaced return: boolean True on success |
removeFiles($element, $cid = 0) X-Ref |
Method to parse through a files element of the installation manifest and remove the files that were installed param: object $element The XML node to process param: integer $cid Application ID of application to remove from return: boolean True on success |
copyManifest($cid = 1) X-Ref |
Copies the installation manifest file to the extension folder in the given client param: integer $cid Where to copy the installfile [optional: defaults to 1 (admin)] return: boolean True on success, False on error |
findManifest() X-Ref |
Tries to find the package manifest file return: boolean True on success, False on error |
isManifest($file) X-Ref |
Is the XML file a valid Joomla installation manifest file. param: string $file An xmlfile path to check return: \SimpleXMLElement|null A \SimpleXMLElement, or null if the file failed to parse |
generateManifestCache() X-Ref |
Generates a manifest cache return: string serialised manifest data |
cleanDiscoveredExtension($type, $element, $folder = '', $client = 0) X-Ref |
Cleans up discovered extensions if they're being installed some other way param: string $type The type of extension (component, etc) param: string $element Unique element identifier (e.g. com_content) param: string $folder The folder of the extension (plugins; e.g. system) param: integer $client The client application (administrator or site) return: object Result of query |
findDeletedFiles($oldFiles, $newFiles) X-Ref |
Compares two "files" entries to find deleted files/folders param: array $oldFiles An array of \SimpleXMLElement objects that are the old files param: array $newFiles An array of \SimpleXMLElement objects that are the new files return: array An array with the delete files and folders in findDeletedFiles[files] and findDeletedFiles[folders] respectively |
loadMD5Sum($filename) X-Ref |
Loads an MD5SUMS file into an associative array param: string $filename Filename to load return: array Associative array with filenames as the index and the MD5 as the value |
parseXMLInstallFile($path) X-Ref |
Parse a XML install manifest file. XML Root tag should be 'install' except for languages which use meta file. param: string $path Full path to XML file. return: array XML metadata. |
getAdapters($options = array() X-Ref |
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: string[] An array of the class names of available install adapters. |
loadAdapter($adapter, $options = array() X-Ref |
Method to load an adapter instance param: string $adapter Adapter name param: array $options Adapter options return: InstallerAdapter |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |