Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #27 from aabdou/master

Add jackalope.factory to the DI extension
  • Loading branch information...
commit 72b15a732230b704717eb457523b3c87ff7028cf 2 parents ca8e4a5 + a554127
@dbu dbu authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 DependencyInjection/DoctrinePHPCRExtension.php
View
12 DependencyInjection/DoctrinePHPCRExtension.php
@@ -150,6 +150,18 @@ private function loadJackalopeSession(array $session, ContainerBuilder $containe
if (isset($session['backend']['expect'])) {
$parameters['jackalope.jackalope.jackrabbit_expect'] = $session['backend']['expect'];
}
+ // Factory
+ if (isset($session['backend']['factory'])) {
+ /**
+ * If it is a class, pass the name as is, else assume it is
+ * a service id and get a reference to it
+ */
+ if (class_exists($session['backend']['factory'])) {
+ $parameters['jackalope.factory'] = $session['backend']['factory'];
+ } else {
+ $parameters['jackalope.factory'] = new Reference($session['backend']['factory']);
+ }
+ }
break;
}
Please sign in to comment.
Something went wrong with that request. Please try again.