Add filename in build archive response
modifié: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilder/TarArchiveBuilder.php modifié: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilder/ZipArchiveBuilder.php modifié: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilderInterface.php
This commit is contained in:
@@ -380,6 +380,7 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
|
|||||||
*
|
*
|
||||||
* This method return an instance of a Response with the archive as content.
|
* This method return an instance of a Response with the archive as content.
|
||||||
*/
|
*/
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
public function buildArchiveResponse($filename)
|
public function buildArchiveResponse($filename)
|
||||||
{
|
{
|
||||||
@@ -419,6 +420,9 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
|
|||||||
* @param FileDownloaderInterface $fileDownloader
|
* @param FileDownloaderInterface $fileDownloader
|
||||||
=======
|
=======
|
||||||
public function buildArchiveResponse()
|
public function buildArchiveResponse()
|
||||||
|
=======
|
||||||
|
public function buildArchiveResponse($filename)
|
||||||
|
>>>>>>> Add filename in build archive response
|
||||||
{
|
{
|
||||||
$this->tar->setMetadata("Generated by Thelia v" . Thelia::THELIA_VERSION);
|
$this->tar->setMetadata("Generated by Thelia v" . Thelia::THELIA_VERSION);
|
||||||
|
|
||||||
@@ -444,6 +448,7 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
|
|||||||
200,
|
200,
|
||||||
[
|
[
|
||||||
"Content-Type" => $this->getMimeType(),
|
"Content-Type" => $this->getMimeType(),
|
||||||
|
"Content-Disposition" => $filename . "." . $this->getExtension(),
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -639,11 +639,15 @@ class ZipArchiveBuilder extends AbstractArchiveBuilder
|
|||||||
*
|
*
|
||||||
* This method return an instance of a Response with the archive as content.
|
* This method return an instance of a Response with the archive as content.
|
||||||
*/
|
*/
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
public function buildArchiveResponse($filename)
|
public function buildArchiveResponse($filename)
|
||||||
=======
|
=======
|
||||||
public function buildArchiveResponse()
|
public function buildArchiveResponse()
|
||||||
>>>>>>> Define archive builders and formatters
|
>>>>>>> Define archive builders and formatters
|
||||||
|
=======
|
||||||
|
public function buildArchiveResponse($filename)
|
||||||
|
>>>>>>> Add filename in build archive response
|
||||||
{
|
{
|
||||||
$this->zip->comment = "Generated by Thelia v" . Thelia::THELIA_VERSION;
|
$this->zip->comment = "Generated by Thelia v" . Thelia::THELIA_VERSION;
|
||||||
|
|
||||||
@@ -720,12 +724,17 @@ class ZipArchiveBuilder extends AbstractArchiveBuilder
|
|||||||
$content,
|
$content,
|
||||||
200,
|
200,
|
||||||
[
|
[
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
"Content-Type" => $this->getMimeType(),
|
"Content-Type" => $this->getMimeType(),
|
||||||
"Content-Disposition" => $filename . "." . $this->getExtension(),
|
"Content-Disposition" => $filename . "." . $this->getExtension(),
|
||||||
=======
|
=======
|
||||||
"Content-Type" => $this->getMimeType()
|
"Content-Type" => $this->getMimeType()
|
||||||
>>>>>>> Define archive builders and formatters
|
>>>>>>> Define archive builders and formatters
|
||||||
|
=======
|
||||||
|
"Content-Type" => $this->getMimeType(),
|
||||||
|
"Content-Disposition" => $filename . "." . $this->getExtension(),
|
||||||
|
>>>>>>> Add filename in build archive response
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ interface ArchiveBuilderInterface
|
|||||||
* This method creates an empty directory
|
* This method creates an empty directory
|
||||||
*/
|
*/
|
||||||
public function addDirectory($directoryPath);
|
public function addDirectory($directoryPath);
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -148,10 +149,16 @@ interface ArchiveBuilderInterface
|
|||||||
=======
|
=======
|
||||||
/**
|
/**
|
||||||
>>>>>>> Finish implementing and testing zip
|
>>>>>>> Finish implementing and testing zip
|
||||||
|
=======
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @params string $filename
|
||||||
|
>>>>>>> Add filename in build archive response
|
||||||
* @return \Thelia\Core\HttpFoundation\Response
|
* @return \Thelia\Core\HttpFoundation\Response
|
||||||
*
|
*
|
||||||
* This method return an instance of a Response with the archive as content.
|
* This method return an instance of a Response with the archive as content.
|
||||||
*/
|
*/
|
||||||
|
<<<<<<< HEAD
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
public function buildArchiveResponse($filename);
|
public function buildArchiveResponse($filename);
|
||||||
|
|
||||||
@@ -160,6 +167,9 @@ interface ArchiveBuilderInterface
|
|||||||
* @param bool $isOnline
|
* @param bool $isOnline
|
||||||
=======
|
=======
|
||||||
public function buildArchiveResponse();
|
public function buildArchiveResponse();
|
||||||
|
=======
|
||||||
|
public function buildArchiveResponse($filename);
|
||||||
|
>>>>>>> Add filename in build archive response
|
||||||
|
|
||||||
/**
|
/**
|
||||||
<<<<<<< HEAD
|
<<<<<<< HEAD
|
||||||
|
|||||||
Reference in New Issue
Block a user