JInstallerHelper
Installer helper class
package |
Joomla.Platform |
---|---|
subpackage |
Installer |
since |
11.1 |
Methods
cleanupInstall
Clean up temporary uploaded package and unpacked extension
cleanupInstall(string $package, string $resultdir) : boolean
since |
11.1 |
---|
Arguments
- $package
string
Path to the uploaded package file- $resultdir
string
Path to the unpacked extension
Response
boolean
True on success
detectType
Method to detect the extension type from a package directory
detectType(string $p_dir) : mixed
since |
11.1 |
---|
Arguments
- $p_dir
string
Path to package directory
Response
mixed
Extension type string or boolean false on fail
downloadPackage
Downloads a package
downloadPackage(string $url, string $target = false) : mixed
since |
11.1 |
---|
Arguments
- $url
string
URL of file to download- $target
string
Download target filename [optional]
Response
mixed
Path to downloaded package or boolean false on failure
getFilenameFromURL
Gets a file name out of a url
getFilenameFromURL(string $url) : mixed
since |
11.1 |
---|
Arguments
- $url
string
URL to get name from
Response
mixed
String filename or boolean false if failed
splitSql
Splits contents of a sql file into array of discreet queries.
splitSql(string $sql) : array
Queries need to be delimited with end of statement marker ';'
since |
11.1 |
---|
Arguments
- $sql
string
The SQL statement.
Response
array
Array 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
since |
11.1 |
---|
Arguments
- $p_filename
string
The uploaded package filename or install directory
Response
array
Two elements: extractdir and packagefile