function downloadFile($url, $target) { juimport('pasamio.downloader.downloader'); $downloader =& Downloader::getInstance(); $error_object = new stdClass(); $params = JComponentHelper::getParams('com_jupdateman'); $adapter = null; switch ($params->get('download_method', 0)) { case JUPDATEMAN_DLMETHOD_FOPEN: default: $adapter = $downloader->getAdapter('fopen'); break; case JUPDATEMAN_DLMETHOD_CURL: $adapter = $downloader->getAdapter('curl'); break; } return $adapter->downloadFile($url, $target, $params); }
function downloadFile($url, $target) { RokUpdater::import('pasamio.downloader.downloader'); $downloader =& Downloader::getInstance(); //$error_object = new stdClass(); $adapter = null; switch ($this->download_method) { case ROKUPDATER_DLMETHOD_FOPEN: default: $adapter = $downloader->getAdapter('fopen'); break; case ROKUPDATER_DLMETHOD_CURL: $adapter = $downloader->getAdapter('curl'); break; } return $adapter->downloadFile($url, $target, $this->params); }