*/ class LocalAdapterFactory implements AdapterFactoryInterface { /** * {@inheritDoc} */ public function create(ContainerBuilder $container, $id, array $config) { $container ->setDefinition($id, new DefinitionDecorator('knplabs_gaufrette.adapter.local')) ->replaceArgument(0, $config['directory']) ->replaceArgument(1, $config['create']) ; } /** * {@inheritDoc} */ public function getKey() { return 'local'; } /** * {@inheritDoc} */ public function addConfiguration(NodeDefinition $node) { $node ->children() ->scalarNode('directory')->isRequired()->end() ->booleanNode('create')->defaultTrue()->end() ->end() ; } }