Replace AmazonS3 create boolean param with array one. Changed
composer.json
This commit is contained in:
@@ -18,12 +18,14 @@ class AmazonS3AdapterFactory implements AdapterFactoryInterface
|
||||
*/
|
||||
public function create(ContainerBuilder $container, $id, array $config)
|
||||
{
|
||||
$container
|
||||
$definition = $container
|
||||
->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.amazon_s3'))
|
||||
->addArgument(new Reference($config['amazon_s3_id']))
|
||||
->addArgument($config['bucket_name'])
|
||||
->addArgument($config['create'])
|
||||
;
|
||||
->addArgument($config['bucket_name']);
|
||||
|
||||
if (isset($config['options'])) {
|
||||
$definition->addArgument($config['options']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,8 +49,16 @@ class AmazonS3AdapterFactory implements AdapterFactoryInterface
|
||||
->children()
|
||||
->scalarNode('amazon_s3_id')->isRequired()->cannotBeEmpty()->end()
|
||||
->scalarNode('bucket_name')->isRequired()->cannotBeEmpty()->end()
|
||||
->booleanNode('create')->defaultFalse()->end()
|
||||
->arrayNode('options')
|
||||
->children()
|
||||
->booleanNode('create')
|
||||
->defaultFalse()
|
||||
->end()
|
||||
->scalarNode('region')->end()
|
||||
->scalarNode('directory')->end()
|
||||
->end()
|
||||
->end()
|
||||
->end()
|
||||
;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user