JInstallerHelper

Installer helper class

abstract
package

Joomla.Platform

subpackage

Installer

since

11.1

Methods

cleanupInstall

Clean up temporary uploaded package and unpacked extension

cleanupInstall(string $package, string $resultdir) : boolean
static
since

11.1

Arguments

$package

stringPath to the uploaded package file

$resultdir

stringPath to the unpacked extension

Response

booleanTrue on success

detectType

Method to detect the extension type from a package directory

detectType(string $p_dir) : mixed
static
since

11.1

Arguments

$p_dir

stringPath to package directory

Response

mixedExtension type string or boolean false on fail

downloadPackage

Downloads a package

downloadPackage(string $url, string $target = false) : mixed
static
since

11.1

Arguments

$url

stringURL of file to download

$target

stringDownload target filename [optional]

Response

mixedPath to downloaded package or boolean false on failure

getFilenameFromURL

Gets a file name out of a url

getFilenameFromURL(string $url) : mixed
static
since

11.1

Arguments

$url

stringURL to get name from

Response

mixedString filename or boolean false if failed

splitSql

Splits contents of a sql file into array of discreet queries.

splitSql(string $sql) : array
static

Queries need to be delimited with end of statement marker ';'

since

11.1

Arguments

$sql

stringThe SQL statement.

Response

arrayArray of queries

unpack

Unpacks a file and verifies it as a Joomla element package Supports .gz .tar .tar.gz and .zip

unpack(string $p_filename) : array
static
since

11.1

Arguments

$p_filename

stringThe uploaded package filename or install directory

Response

arrayTwo elements: extractdir and packagefile