Remove static create calls in Symlinker module

This commit is contained in:
Benoît Burnichon
2016-01-14 10:46:18 +01:00
parent c7d0d63b1d
commit bba360c3a1
4 changed files with 7 additions and 25 deletions

View File

@@ -11,10 +11,8 @@
namespace Alchemy\Phrasea\Http\StaticFile\Symlink;
use Alchemy\Phrasea\Exception\InvalidArgumentException;
use Silex\Application;
use Symfony\Component\Filesystem\Filesystem;
use Guzzle\Http\Url;
/**
* Create & retrieve symlinks
@@ -25,15 +23,6 @@ class SymLinker
protected $fs;
protected $symlinkDir;
public static function create(Application $app)
{
return new SymLinker(
$app['phraseanet.thumb-symlinker-encoder'],
$app['filesystem'],
$app['thumbnail.path']
);
}
public function __construct(SymLinkerEncoder $encoder, Filesystem $fs, $symlinkDir)
{
$this->encoder = $encoder;

View File

@@ -11,21 +11,10 @@
namespace Alchemy\Phrasea\Http\StaticFile\Symlink;
use Silex\Application;
use Symfony\Component\Filesystem\Filesystem;
use Guzzle\Http\Url;
class SymLinkerEncoder
{
protected $key;
public static function create(Application $app)
{
return new self(
$app['phraseanet.configuration']['main']['key']
);
}
public function __construct($key)
{
$this->key = $key;