Back to Joomla project (class list)

Class InstallerHelper - list of methods

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

Method Summary

public static string|bool
(mixed $url, mixed $target = false)

Downloads a package
Parameters
  • string $url URL of file to download
  • string|bool $target Download target filename or false to get the filename from the URL
Returns
  • string|bool Path to downloaded package or boolean false on failure
Since
  • 3.1
Show source code of this method: downloadPackage Source Code

public static array|bool
(mixed $packageFilename, mixed $alwaysReturnArray = false)

Unpacks a file and verifies it as a Joomla element package Supports .gz .tar .tar.gz and .zip
Parameters
  • string $packageFilename The uploaded package filename or install directory
  • bool $alwaysReturnArray If should return false (and leave garbage behind) or return $retval ['type']=false
Returns
  • array|bool Array on success or boolean false on failure
Since
  • 3.1
Show source code of this method: unpack Source Code

public static mixed
(mixed $packageDirectory)

Method to detect the extension type from a package directory
Parameters
  • string $packageDirectory Path to package directory
Returns
  • mixed Extension type string or boolean false on fail
Since
  • 3.1
Show source code of this method: detectType Source Code

public static string
(mixed $url)

Gets a file name out of a url
Parameters
  • string $url URL to get name from
Returns
  • string Clean version of the filename or a unique id
Since
  • 3.1
Show source code of this method: getFilenameFromUrl Source Code

public static bool
(mixed $package, mixed $resultdir)

Clean up temporary uploaded package and unpacked extension
Parameters
  • string $package Path to the uploaded package file
  • string $resultdir Path to the unpacked extension
Returns
  • bool True on success
Since
  • 3.1
Show source code of this method: cleanupInstall Source Code

public static int
(mixed $packagefile, mixed $updateObject)

Return the result of the checksum of a package with the SHA256/SHA384/SHA512 tags in the update server manifest
Parameters
  • string $packagefile Location of the package to be installed
  • \Joomla\CMS\Updater\Update $updateObject The Update Object
Returns
  • int one if the hashes match, zero if hashes doesn't match, two if hashes not found
Since
  • 3.9.0
Show source code of this method: isChecksumValid Source Code

Constants Summary

public int
$HASH_NOT_VALIDATED
Hash not validated identifier.
Since
  • 3.9.0
public int
$HASH_VALIDATED
Hash validated identifier.
Since
  • 3.9.0
public int
$HASH_NOT_PROVIDED
Hash not provided identifier.
Since
  • 3.9.0

Tags Summary

Since
3.1
OSZAR »