Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createDownloadZip example
$metaRequest
=
new
MetaRequest
(
$request
->
getTechnicalName
(
)
,
$request
->
getShopwareVersion
(
)
,
$request
->
getDomain
(
)
,
$request
->
getToken
(
)
)
;
$result
=
$this
->
getMetaInformation
(
$metaRequest
)
;
$response
=
$this
->httpClient->
get
(
$result
->
getUri
(
)
)
;
$file
=
$this
->
createDownloadZip
(
$response
->
getBody
(
)
)
;
$this
->
extractPluginZip
(
$file
,
$metaRequest
->
getTechnicalName
(
)
)
;
unlink
(
$file
)
;
return
true;
}
/** * @return string file path to the downloaded file */
private
function
createDownloadZip
(
string
$content
)
: string
{