Some helpers to ease implementation of some Doctrine Common's features in Zend Framework 1.11.x
This was part of my Doctrine ODM Zend Framework integration, but I decided to make it independent for easier re-use.
- A simple way to setup class loading via Doctrine's ClassLoader
- A Doctrine compatible Zend_Cache frontend
In your application.ini, before resources configuration :
pluginpaths.Axiomes\Application\Resource\ = APPLICATION_PATH "/../library/Axiomes/Application/Resource/"
autoloadernamespaces[] = "Axiomes"
// Specify the ClassLoader path
resources.doctrineloader.classLoaderPath = LIBRARY_PATH "/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php"
// Doctrine Common library autoloading
resources.doctrineloader.namespaces.Doctrine\Common = LIBRARY_PATH "/vendor/doctrine-common/lib"
// Other vendor libraires, like Doctrine ODM
resources.doctrineloader.namespaces.Doctrine\MongoDB = LIBRARY_PATH "/vendor/doctrine-mongodb/lib"
resources.doctrineloader.namespaces.Doctrine\ODM\MongoDB = LIBRARY_PATH "/vendor/doctrine-odm-mongodb/lib"
resources.doctrineloader.namespaces.Symfony\Components = LIBRARY_PATH "/vendor/symfony-components/lib"
//if you use the CacheManager resource plugin, add a Doctrine Compatible cache :
resources.cacheManager.myMetadataCacheName.frontend.name = "Axiomes_Cache_DoctrineCompatible"
resources.cacheManager.myMetadataCacheName.frontend.customBackendNaming = true
--other frontend options and backend options--
//exemple for Doctrine ODM metadata cache
resources.odm.configuration.metadataCacheImpl = "myMetadataCacheName"