mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 15:33:15 +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
|
||||
{
|
||||
@@ -62,6 +63,7 @@ trait DelivererAware
|
||||
* @param string $disposition
|
||||
* @param string|null $mimeType
|
||||
* @param integer $cacheDuration
|
||||
* @return Response
|
||||
*/
|
||||
public function deliverFile($file, $filename = null, $disposition = DeliverDataInterface::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = null)
|
||||
{
|
||||
@@ -76,6 +78,7 @@ trait DelivererAware
|
||||
* @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