Skip to content

Commit 85dd84a

Browse files
committed
had to lower interface requirements for the controllers
1 parent bd400e8 commit 85dd84a

File tree

5 files changed

+7
-25
lines changed

5 files changed

+7
-25
lines changed

Uploader/Storage/FilesystemStorage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
use Oneup\UploaderBundle\Uploader\File\FilesystemFile;
66

7-
class FilesystemStorage implements FilesystemStorageInterface
7+
class FilesystemStorage implements StorageInterface
88
{
99
protected $directory;
1010

@@ -13,7 +13,7 @@ public function __construct($directory)
1313
$this->directory = $directory;
1414
}
1515

16-
public function upload(FilesystemFile $file, $name, $path = null)
16+
public function upload($file, $name, $path = null)
1717
{
1818
$path = is_null($path) ? $name : sprintf('%s/%s', $path, $name);
1919
$path = sprintf('%s/%s', $this->directory, $path);

Uploader/Storage/FilesystemStorageInterface.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

Uploader/Storage/GaufretteStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public function __construct(Filesystem $filesystem, $bufferSize, $streamWrapperP
1919
$this->streamWrapperPrefix = $streamWrapperPrefix;
2020
}
2121

22-
public function upload(FileInterface $file, $name, $path = null)
22+
public function upload($file, $name, $path = null)
2323
{
2424
$path = is_null($path) ? $name : sprintf('%s/%s', $path, $name);
2525

Uploader/Storage/OrphanageStorage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Oneup\UploaderBundle\Uploader\Storage;
44

55
use Oneup\UploaderBundle\Uploader\File\FileInterface;
6+
use Oneup\UploaderBundle\Uploader\File\FilesystemFile;
67
use Symfony\Component\HttpFoundation\Session\SessionInterface;
78
use Symfony\Component\HttpFoundation\File\File;
89
use Symfony\Component\Finder\Finder;
@@ -28,7 +29,7 @@ public function __construct(StorageInterface $storage, SessionInterface $session
2829
$this->type = $type;
2930
}
3031

31-
public function upload(FileInterface $file, $name, $path = null)
32+
public function upload($file, $name, $path = null)
3233
{
3334
if(!$this->session->isStarted())
3435
throw new \RuntimeException('You need a running session in order to run the Orphanage.');

Uploader/Storage/StorageInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ interface StorageInterface
99
/**
1010
* Uploads a File instance to the configured storage.
1111
*
12-
* @param FileInterface $file
12+
* @param $file
1313
* @param string $name
1414
* @param string $path
1515
*/
16-
public function upload(FileInterface $file, $name, $path = null);
16+
public function upload($file, $name, $path = null);
1717
}

0 commit comments

Comments
 (0)