Skip to content

Instantly share code, notes, and snippets.

@rufinus
Created October 2, 2012 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save rufinus/3820270 to your computer and use it in GitHub Desktop.
Save rufinus/3820270 to your computer and use it in GitHub Desktop.
return array(
'controllers' => array(
'initializers' => array(
function ($instance, $serviceManager) {
if ($instance instanceof EntityManagerAwareInterface) {
if($serviceManager->has('doctrine.entitymanager.orm_default')) {
$instance->setEntityManager($serviceManager->get('doctrine.entitymanager.orm_default'));
}
}
[...]
}
},
'doctrine' => array(
'driver' => array(
'Application_driver' => array(
'class' => 'Doctrine\ORM\Mapping\Driver\AnnotationDriver',
'cache' => 'array',
'paths' => array(__DIR__ . '/../../Application/src/Application/Entity')
),
'orm_default' => array(
'drivers' => array(
'Application\Entity' => 'Application_driver'
)
)
)
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment