Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configurable parent classes #6

Merged
merged 1 commit into from
Mar 1, 2017

Conversation

marliotto
Copy link

@marliotto marliotto commented Feb 2, 2017

I'd like to change parent class for generated classes.

For example

$mondator = new Mondator();
$mondator->setConfigClasses($configClasses);
$mondator->setExtensions(array(
    new Mandango\Extension\Core(array(
        'metadata_factory_class'  => 'Model\Mapping\Metadata',
        'metadata_factory_output' => __DIR__.'/Model/Mapping',
        'default_output'          => __DIR__.'/Model',
        'repository_parent_class' => \App\Mandango\MyRepository::class,
        'query_parent_class' => \App\Mandango\MyQuery::class,
        'document_parent_class' => \App\Mandango\MyDocument::class,
        'embedded_document_parent_class' => \App\Mandango\MyEmbeddedDocument::class,
    )),
    new Mandango\Extension\DocumentArrayAccess(),
    new Mandango\Extension\DocumentPropertyOverloading(),
    new Mandango\Extension\DocumentInitializer()
));
$mondator->process();

@netom netom merged commit a22f091 into netom:master Mar 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants