This commit is contained in:
Cyprian Beauvois 2019-02-20 12:19:03 +01:00
parent c167b3a6c3
commit 22dc8b4a5e
3 changed files with 11 additions and 0 deletions

View File

@ -22,6 +22,9 @@ class StorageExtension extends Extension
$configuration = $this->getConfiguration($configs, $container);
$config = $this->processConfiguration($configuration, $configs);
$definition = $container->getDefinition('bluesquare.storage');
$definition->setArgument('user_config', $config);
return $config;
}

View File

@ -3,4 +3,5 @@ services:
class: Bluesquare\StorageBundle\Storage
autowire: true
public: true
arguments: ['']
Bluesquare\CryptorBundle\Cryptor: '@bluesquare.storage'

View File

@ -10,6 +10,13 @@ use Aws\S3\S3Client;
*/
class Storage
{
private $user_config = [];
public function __construct($user_config)
{
$this->user_config = $user_config;
}
public function get($storage_name)
{
// TODO: on récupère les infos sur ce storage dans la config utilisateur (config/bluesquare/storage.yaml)