Permalink
Browse files

Add more config support

  • Loading branch information...
1 parent af88b22 commit e24d4d545be63fc8affef6b53ee4f5953e40309b @superdweebie superdweebie committed Feb 11, 2013
View
@@ -30,6 +30,8 @@
'default_db' => null,
'filters' => array() // array('filterName' => 'BSON\Filter\Class')
+
+ //'classMetadataFactoryName' => 'ClassName'
)
),
@@ -110,6 +110,12 @@ class Configuration extends AbstractOptions
/**
*
+ * @var string
+ */
+ protected $classMetadataFactoryName;
+
+ /**
+ *
* @param string $driver
* @return \DoctrineMongoODMModule\Options\Configuration
*/
@@ -312,4 +318,13 @@ public function getLogger()
{
return $this->logger;
}
+
+ public function getClassMetadataFactoryName() {
+ return $this->classMetadataFactoryName;
+ }
+
+ public function setClassMetadataFactoryName($classMetadataFactoryName) {
+ $this->classMetadataFactoryName = (string) $classMetadataFactoryName;
+ }
+
}
@@ -76,6 +76,8 @@ public function createService(ServiceLocatorInterface $serviceLocator)
// finally, the driver
$config->setMetadataDriverImpl($serviceLocator->get($options->getDriver()));
+ $config->setClassMetadataFactoryName($options->getClassMetadataFactoryName());
+
return $config;
}

0 comments on commit e24d4d5

Please sign in to comment.