A wrapper for setting up the Doctrine EntityManager to use it in all modules of EasyBib. It assumes you're using a ZF MVC application with modules placed inside an "app" folder.
Load your doctrine.ini with Zend_Config_Ini or ez_Core_LoadConfig (Zend_Config_Ini object is needed!)
Set the options of Resource:
Initialize DoctrineResource by:
$doctrineResource = new \EasyBib\Doctrine\DoctrineResource(
$doctrineIniConfig, // your doctrine.ini settings
$root, // path to your app root folder
'default', // zf mvc module name you want to use the DoctrineResource from
$options // the options array for loading needed PlugIns, can be an empty array()
);
Use the Doctrine EntityManager:
$em = $doctrineResource->getEntityManager();
Have fun with Doctrine!