mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
PHPCS
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
namespace Alchemy\Phrasea\Application\Helper;
|
||||
|
||||
use Alchemy\Phrasea\Http\DeliverDataInterface;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
|
||||
trait DelivererAware
|
||||
{
|
||||
@@ -57,11 +58,12 @@ trait DelivererAware
|
||||
/**
|
||||
* Returns a HTTP Response ready to deliver a binary file
|
||||
*
|
||||
* @param string $file
|
||||
* @param string $filename
|
||||
* @param string $disposition
|
||||
* @param string $file
|
||||
* @param string $filename
|
||||
* @param string $disposition
|
||||
* @param string|null $mimeType
|
||||
* @param integer $cacheDuration
|
||||
* @param integer $cacheDuration
|
||||
* @return Response
|
||||
*/
|
||||
public function deliverFile($file, $filename = null, $disposition = DeliverDataInterface::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = null)
|
||||
{
|
||||
@@ -71,11 +73,12 @@ trait DelivererAware
|
||||
/**
|
||||
* Return a HTTP Response ready to deliver data
|
||||
*
|
||||
* @param string $data
|
||||
* @param string $filename
|
||||
* @param string $mimeType
|
||||
* @param string $disposition
|
||||
* @param string $data
|
||||
* @param string $filename
|
||||
* @param string $mimeType
|
||||
* @param string $disposition
|
||||
* @param integer $cacheDuration
|
||||
* @return Response
|
||||
*/
|
||||
public function deliverData($data, $filename, $mimeType, $disposition = DeliverDataInterface::DISPOSITION_INLINE, $cacheDuration = null)
|
||||
{
|
||||
|
@@ -11,6 +11,7 @@
|
||||
|
||||
namespace Alchemy\Phrasea\Http;
|
||||
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
|
||||
|
||||
interface DeliverDataInterface
|
||||
@@ -26,6 +27,7 @@ interface DeliverDataInterface
|
||||
* @param string $disposition
|
||||
* @param string|null $mimeType
|
||||
* @param integer $cacheDuration
|
||||
* @return Response
|
||||
*/
|
||||
public function deliverFile($file, $filename = null, $disposition = self::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = null);
|
||||
|
||||
@@ -37,6 +39,7 @@ interface DeliverDataInterface
|
||||
* @param string $mimeType
|
||||
* @param string $disposition
|
||||
* @param integer $cacheDuration
|
||||
* @return Response
|
||||
*/
|
||||
public function deliverData($data, $filename, $mimeType, $disposition = self::DISPOSITION_INLINE, $cacheDuration = null);
|
||||
}
|
||||
|
@@ -23,9 +23,6 @@ class ServeFileResponseFactory implements DeliverDataInterface
|
||||
$this->unicode = $unicode;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function deliverFile($file, $filename = '', $disposition = self::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = null)
|
||||
{
|
||||
$response = new BinaryFileResponse($file);
|
||||
@@ -41,9 +38,6 @@ class ServeFileResponseFactory implements DeliverDataInterface
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function deliverData($data, $filename, $mimeType, $disposition = self::DISPOSITION_INLINE, $cacheDuration = null)
|
||||
{
|
||||
$response = new Response($data);
|
||||
|
Reference in New Issue
Block a user