Class JInstallerHelper
Methods summary
public static
string|boolean
|
#
downloadPackage( string $url, mixed $target = false )
Downloads a package
Parameters
- $url
string - $url URL of file to download
- $target
mixed - $target Download target filename or false to get the filename from the URL
Returns
string|boolean - Path to downloaded package or boolean false on failure
Since
3.1
|
public static
array|boolean
|
#
unpack( string $p_filename, boolean $alwaysReturnArray = false )
Unpacks a file and verifies it as a Joomla element package Supports .gz .tar
.tar.gz and .zip
Unpacks a file and verifies it as a Joomla element package Supports .gz .tar
.tar.gz and .zip
Parameters
- $p_filename
string - $p_filename The uploaded package filename or install directory
- $alwaysReturnArray
boolean - $alwaysReturnArray If should return false (and leave garbage behind) or return
$retval['type']=false
Returns
array|boolean - Array on success or boolean false on failure
Since
3.1
|
public static
mixed
|
#
detectType( string $p_dir )
Method to detect the extension type from a package directory
Method to detect the extension type from a package directory
Parameters
- $p_dir
string - $p_dir Path to package directory
Returns
mixed - Extension type string or boolean false on fail
Since
3.1
|
public static
mixed
|
#
getFilenameFromUrl( string $url )
Gets a file name out of a url
Gets a file name out of a url
Parameters
- $url
string - $url URL to get name from
Returns
mixed - String filename or boolean false if failed
Since
3.1
|
public static
boolean
|
#
cleanupInstall( string $package, string $resultdir )
Clean up temporary uploaded package and unpacked extension
Clean up temporary uploaded package and unpacked extension
Parameters
- $package
string - $package Path to the uploaded package file
- $resultdir
string - $resultdir Path to the unpacked extension
Returns
boolean - True on success
Since
3.1
|
public static
array
|
#
splitSql( string $query )
Splits contents of a sql file into array of discreet queries. Queries need to
be delimited with end of statement marker ';'
Splits contents of a sql file into array of discreet queries. Queries need to
be delimited with end of statement marker ';'
Deprecated
13.3 Use JDatabaseDriver::splitSql() directly
Parameters
- $query
string - $query The SQL statement.
Returns
array - Array of queries
Since
3.1
CodeCoverageIgnore
|
Magic methods summary