Update adapter factory interface

This commit is contained in:
Antoine Hérault
2011-05-13 07:11:59 +02:00
parent 1253405c41
commit c2529cab1c
6 changed files with 11 additions and 22 deletions

View File

@@ -18,14 +18,10 @@ class InMemoryAdapterFactory implements AdapterFactoryInterface
*/
public function create(ContainerBuilder $container, $id, array $config)
{
$adapter = sprintf('knplabs_gaufrette.adapter.local.%s', $id);
$container
->setDefinition($adapter, new DefinitionDecorator('knplabs_gaufrette.adapter.in_memory'))
->setDefinition($id, new DefinitionDecorator('knplabs_gaufrette.adapter.in_memory'))
->replaceArgument(0, $config['files'])
;
return $adapter;
}
/**