Skip to content

axiomes/Doctrine-Common-For-Zend-Framework

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Doctrine Common, for Zend Framework 1.11.X

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.

Features

What it provides

  • A simple way to setup class loading via Doctrine's ClassLoader
  • A Doctrine compatible Zend_Cache frontend

How to use it:

Add plugin path(s) and lib auto loading before resources definition

In your application.ini, before resources configuration :

pluginpaths.Axiomes\Application\Resource\ = APPLICATION_PATH "/../library/Axiomes/Application/Resource/"

autoloadernamespaces[] = "Axiomes"

Set up the ClassLoader :

// 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"

The Doctrine compatible Zend_Cache frontend : Axiomes_Cache_DoctrineCompatible

//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"

About

Provides an easy way to use Doctrine's ClassLoader, and a Doctrine compatible Zend_Cache frontend

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages