This commit is contained in:
Romain Neutron
2013-06-28 22:31:33 +02:00
parent d533b423fc
commit 0800d9bb96
8 changed files with 13 additions and 22 deletions

View File

@@ -13,12 +13,6 @@ namespace Alchemy\Phrasea\Command;
use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\OutputInterface;
use Alchemy\Phrasea\Setup\Requirements\BinariesRequirements;
use Alchemy\Phrasea\Setup\Requirements\FilesystemRequirements;
use Alchemy\Phrasea\Setup\Requirements\LocalesRequirements;
use Alchemy\Phrasea\Setup\Requirements\PhraseaRequirements;
use Alchemy\Phrasea\Setup\Requirements\PhpRequirements;
use Alchemy\Phrasea\Setup\Requirements\SystemRequirements;
use Alchemy\Phrasea\Command\Setup\CheckEnvironment; use Alchemy\Phrasea\Command\Setup\CheckEnvironment;
class CheckConfig extends CheckEnvironment class CheckConfig extends CheckEnvironment

View File

@@ -20,7 +20,6 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException; use Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface; use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
class ApiExceptionHandlerSubscriber implements EventSubscriberInterface class ApiExceptionHandlerSubscriber implements EventSubscriberInterface

View File

@@ -21,21 +21,21 @@ interface DeliverDataInterface
/** /**
* Returns a HTTP Response ready to deliver a binary file * Returns a HTTP Response ready to deliver a binary file
* *
* @param string $file * @param string $file
* @param string $filename * @param string $filename
* @param string $disposition * @param string $disposition
* @param string|null $mimetype * @param string|null $mimetype
* @param integer $cacheDuration * @param integer $cacheDuration
*/ */
public function deliverFile($file, $filename = null, $disposition = self::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = 3600); public function deliverFile($file, $filename = null, $disposition = self::DISPOSITION_INLINE, $mimeType = null, $cacheDuration = 3600);
/** /**
* Return a HTTP Response ready to deliver data * Return a HTTP Response ready to deliver data
* *
* @param string $data * @param string $data
* @param string $filename * @param string $filename
* @param string $mimeType * @param string $mimeType
* @param string $disposition * @param string $disposition
* @param integer $cacheDuration * @param integer $cacheDuration
*/ */
public function deliverData($data, $filename, $mimeType, $disposition = self::DISPOSITION_INLINE, $cacheDuration = 3600); public function deliverData($data, $filename, $mimeType, $disposition = self::DISPOSITION_INLINE, $cacheDuration = 3600);

View File

@@ -32,7 +32,7 @@ class ServeFileResponseFactory implements DeliverDataInterface
} }
/** /**
* @param Application $app * @param Application $app
* @return self * @return self
*/ */
public static function create(Application $app) public static function create(Application $app)

View File

@@ -32,7 +32,7 @@ class XsendfileMapping
{ {
$final = array(); $final = array();
foreach($this->mapping as $entry) { foreach ($this->mapping as $entry) {
if (!is_dir($entry['directory']) || '' === $entry['mount-point']) { if (!is_dir($entry['directory']) || '' === $entry['mount-point']) {
continue; continue;
} }
@@ -60,7 +60,7 @@ class XsendfileMapping
private function validate(array $mapping) private function validate(array $mapping)
{ {
foreach($mapping as $entry) { foreach ($mapping as $entry) {
if (!is_array($entry)) { if (!is_array($entry)) {
throw new InvalidArgumentException('XSendFile mapping entry must be an array'); throw new InvalidArgumentException('XSendFile mapping entry must be an array');
} }

View File

@@ -11,8 +11,6 @@
use Alchemy\Phrasea\Application; use Alchemy\Phrasea\Application;
use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
use Symfony\Component\HttpFoundation\Response;
/** /**
* *