*/ class DoctrineDbalAdapterFactory implements AdapterFactoryInterface { /** * {@inheritDoc} */ function create(ContainerBuilder $container, $id, array $config) { $definition = $container ->setDefinition($id, new DefinitionDecorator('knp_gaufrette.adapter.doctrine_dbal')) ->addArgument(new Reference($config['doctrine_dbal_id'])) ->addArgument($config['table']) ; if (isset($config['columns'])) { $definition->addArgument($config['columns']); } } /** * {@inheritDoc} */ function getKey() { return 'doctrine_dbal'; } /** * {@inheritDoc} */ function addConfiguration(NodeDefinition $builder) { $builder ->children() ->scalarNode('doctrine_dbal_id')->isRequired()->cannotBeEmpty()->end() ->scalarNode('table')->isRequired()->cannotBeEmpty()->end() ->arrayNode('columns') ->children() ->scalarNode('key')->end() ->scalarNode('content')->end() ->scalarNode('mtime')->end() ->scalarNode('checksum')->end() ->end() ->end() ->end() ; } }