Permalink
Browse files

Merge pull request #25 from pitpit/workspace-dir-enhance

added support for workspace_dir config
  • Loading branch information...
2 parents 83cd377 + 1d70f8f commit 5fa30aa2faf364c72c87ab9a6afcb26a862cecb2 @dbu dbu committed Oct 31, 2012
View
1 DependencyInjection/Configuration.php
@@ -38,6 +38,7 @@ public function getConfigTreeBuilder()
$rootNode = $treeBuilder->root('doctrine_phpcr')
->children()
->scalarNode('jackrabbit_jar')->end()
+ ->scalarNode('workspace_dir')->end()
->scalarNode('dump_max_line_length')->defaultValue(120)->end()
->end()
;
View
4 DependencyInjection/DoctrinePHPCRExtension.php
@@ -58,6 +58,10 @@ public function load(array $configs, ContainerBuilder $container)
$configuration = new Configuration($container->getParameter('kernel.debug'));
$config = $processor->processConfiguration($configuration, $configs);
+ if (isset($config['workspace_dir'])) {
+ $container->setParameter('doctrine_phpcr.workspace_dir', $config['workspace_dir']);
+ }
+
if (isset($config['jackrabbit_jar'])) {
$container->setParameter('doctrine_phpcr.jackrabbit_jar', $config['jackrabbit_jar']);
}
View
4 OptionalCommand/JackrabbitCommand.php
@@ -95,6 +95,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
$this->setJackrabbitPath($this->getContainer()->getParameter('doctrine_phpcr.jackrabbit_jar'));
}
+ if ($this->getContainer()->hasParameter('doctrine_phpcr.workspace_dir')) {
+ $this->setWorkspaceDir($this->getContainer()->getParameter('doctrine_phpcr.workspace_dir'));
+ }
+
return parent::execute($input, $output);
}
}

0 comments on commit 5fa30aa

Please sign in to comment.