class JInstallerHelper


Located at : UKNOWVA_ROOT/libraries/joomla/installer/helper.php

Installer helper class

Methods

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

Downloads a package

static array
unpack(string $p_filename)

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

static mixed
detectType(string $p_dir)

Method to detect the extension type from a package directory

static mixed
getFilenameFromURL(string $url)

Gets a file name out of a url

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

Clean up temporary uploaded package and unpacked extension

static array
splitSql(string $sql)

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

Details

at line 35
static mixed downloadPackage(string $url, string $target = false)

Downloads a package

Parameters

string $url URL of file to download
string $target Download target filename [optional]

Return Value

mixed Path to downloaded package or boolean false on failure

at line 113
static array unpack(string $p_filename)

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

Parameters

string $p_filename The uploaded package filename or install directory

Return Value

array Two elements: extractdir and packagefile

at line 185
static mixed detectType(string $p_dir)

Method to detect the extension type from a package directory

Parameters

string $p_dir Path to package directory

Return Value

mixed Extension type string or boolean false on fail

at line 229
static mixed getFilenameFromURL(string $url)

Gets a file name out of a url

Parameters

string $url URL to get name from

Return Value

mixed String filename or boolean false if failed

at line 248
static boolean cleanupInstall(string $package, string $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

Return Value

boolean True on success

at line 276
static array splitSql(string $sql)

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

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

Parameters

string $sql

Return Value

array Array of queries