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:
Benjamin Perche
2014-07-04 14:34:30 +02:00
parent c2720c9f2f
commit 169e236588
3 changed files with 24 additions and 0 deletions

View File

@@ -380,6 +380,7 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
*
* This method return an instance of a Response with the archive as content.
*/
<<<<<<< HEAD
<<<<<<< HEAD
public function buildArchiveResponse($filename)
{
@@ -419,6 +420,9 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
* @param FileDownloaderInterface $fileDownloader
=======
public function buildArchiveResponse()
=======
public function buildArchiveResponse($filename)
>>>>>>> Add filename in build archive response
{
$this->tar->setMetadata("Generated by Thelia v" . Thelia::THELIA_VERSION);
@@ -444,6 +448,7 @@ class TarArchiveBuilder extends AbstractArchiveBuilder
200,
[
"Content-Type" => $this->getMimeType(),
"Content-Disposition" => $filename . "." . $this->getExtension(),
]
);
}

View File

@@ -639,11 +639,15 @@ class ZipArchiveBuilder extends AbstractArchiveBuilder
*
* This method return an instance of a Response with the archive as content.
*/
<<<<<<< HEAD
<<<<<<< HEAD
public function buildArchiveResponse($filename)
=======
public function buildArchiveResponse()
>>>>>>> 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;
@@ -720,12 +724,17 @@ class ZipArchiveBuilder extends AbstractArchiveBuilder
$content,
200,
[
<<<<<<< HEAD
<<<<<<< HEAD
"Content-Type" => $this->getMimeType(),
"Content-Disposition" => $filename . "." . $this->getExtension(),
=======
"Content-Type" => $this->getMimeType()
>>>>>>> Define archive builders and formatters
=======
"Content-Type" => $this->getMimeType(),
"Content-Disposition" => $filename . "." . $this->getExtension(),
>>>>>>> Add filename in build archive response
]
);
}

View File

@@ -139,6 +139,7 @@ interface ArchiveBuilderInterface
* This method creates an empty directory
*/
public function addDirectory($directoryPath);
<<<<<<< HEAD
<<<<<<< HEAD
/**
@@ -148,10 +149,16 @@ interface ArchiveBuilderInterface
=======
/**
>>>>>>> Finish implementing and testing zip
=======
/**
* @params string $filename
>>>>>>> Add filename in build archive response
* @return \Thelia\Core\HttpFoundation\Response
*
* This method return an instance of a Response with the archive as content.
*/
<<<<<<< HEAD
<<<<<<< HEAD
public function buildArchiveResponse($filename);
@@ -160,6 +167,9 @@ interface ArchiveBuilderInterface
* @param bool $isOnline
=======
public function buildArchiveResponse();
=======
public function buildArchiveResponse($filename);
>>>>>>> Add filename in build archive response
/**
<<<<<<< HEAD