Add ClassMetadataFactoryName to config options #58

Merged
merged 4 commits into from Feb 12, 2013

Conversation

Projects
None yet
2 participants
@superdweebie
Contributor

superdweebie commented Feb 12, 2013

This is a configuration option available in doctrine mongo odm, but not exposed in the zf2 module.

@Ocramius

View changes

src/DoctrineMongoODMModule/Service/ConfigurationFactory.php
$config->setMetadataDriverImpl($serviceLocator->get($options->getDriver()));
+ // metadataFactory, if set
+ $factoryName = $options->getClassMetadataFactoryName();
+ if (isset($factoryName)){

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Feb 12, 2013

Owner

if ($factoryName = $options->getClassMetadataFactoryName()) {

@Ocramius

Ocramius Feb 12, 2013

Owner

if ($factoryName = $options->getClassMetadataFactoryName()) {

@Ocramius

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Feb 12, 2013

Owner

Is this a new ODM feature?

Owner

Ocramius commented Feb 12, 2013

Is this a new ODM feature?

@superdweebie

This comment has been minimized.

Show comment Hide comment
@superdweebie

superdweebie Feb 12, 2013

Contributor

I don't think it's new. I don't know when it was added.

Contributor

superdweebie commented Feb 12, 2013

I don't think it's new. I don't know when it was added.

@Ocramius

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Feb 12, 2013

Owner

Is there any clue on what this does? O_o

Owner

Ocramius commented Feb 12, 2013

Is there any clue on what this does? O_o

@superdweebie

This comment has been minimized.

Show comment Hide comment
@superdweebie

superdweebie Feb 12, 2013

Contributor

It lets you set the class used for the ClassMetadataFactory. That factory class is the one that creates all the ClassMetadata instance's. So, if you want to extend ClassMetadata, you override the factory, an then tell the config to use the your new factory.

Contributor

superdweebie commented Feb 12, 2013

It lets you set the class used for the ClassMetadataFactory. That factory class is the one that creates all the ClassMetadata instance's. So, if you want to extend ClassMetadata, you override the factory, an then tell the config to use the your new factory.

@Ocramius

This comment has been minimized.

Show comment Hide comment
@Ocramius

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Feb 12, 2013

Owner

@superdweebie do you happen to know how to get travis to build something working again? :)

Owner

Ocramius commented Feb 12, 2013

@superdweebie do you happen to know how to get travis to build something working again? :)

@Ocramius

View changes

src/DoctrineMongoODMModule/Options/Configuration.php
@@ -312,4 +318,13 @@ public function getLogger()
{
return $this->logger;
}
+
+ public function getClassMetadataFactoryName() {

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Feb 12, 2013

Owner

Can you please add docblocks for these methods?

@Ocramius

Ocramius Feb 12, 2013

Owner

Can you please add docblocks for these methods?

@superdweebie

This comment has been minimized.

Show comment Hide comment
@superdweebie

superdweebie Feb 12, 2013

Contributor

I have no idea why Travis is failing ??

Contributor

superdweebie commented Feb 12, 2013

I have no idea why Travis is failing ??

Ocramius added a commit that referenced this pull request Feb 12, 2013

Merge pull request #58 from superdweebie/config
Add ClassMetadataFactoryName to config options

@Ocramius Ocramius merged commit 3a652cf into doctrine:master Feb 12, 2013

1 check failed

default The Travis build failed
Details
@Ocramius

This comment has been minimized.

Show comment Hide comment
@Ocramius

Ocramius Feb 12, 2013

Owner

@superdweebie opened #59 for that. Thank you so far!

Owner

Ocramius commented Feb 12, 2013

@superdweebie opened #59 for that. Thank you so far!

@superdweebie superdweebie deleted the superdweebie:config branch Feb 12, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment