/**
* Used for installing extension from a URL
*
* @param string $url URL to the extension zip file
*
* @return boolean
*
* @since 4.0.0
*
* @throws \Exception
*/
public function processUrlInstallation($url) : bool
{
$filename = InstallerHelper::downloadPackage($url);
$tmpPath = $this->getApplication()->get('tmp_path');
$path = $tmpPath . '/' . basename($filename);
$package = InstallerHelper::unpack($path, true);
if ($package['type'] === false) {
return false;
}
$jInstaller = new Installer();
$result = $jInstaller->install($package['extractdir']);
InstallerHelper::cleanupInstall($path, $package['extractdir']);
return $result;
}