$request =
new RangeDownloadRequest( $metaStruct->
getUri(),
$offset,
(int) $metaStruct->
getSize(),
$metaStruct->
getSha1(),
$destination );
try { $result =
$this->
get('shopware_plugininstaller.plugin_download_service'
)->
downloadRange($request);
} catch (Exception
$e) { $this->
handleException($e);
return;
} if ($result instanceof FinishResult
) { $this->
View()->
assign(['success' => true, 'finish' => true, 'destination' =>
$destination]);
} else { $this->
View()->
assign(['success' => true, 'finish' => false, 'offset' =>
$result->
getOffset()]);
} }