Hi Brian, PHP works on a very different way than java does. We call this share nothing architecture, after the request there are (usually) no data in memory. So you have a completely different way in PHP, this needs some different thinking about stuff.
Zend Registry is unset after the request like every other object. Sure with some hacks you can make the registry permanent, put this is not the PHP way (and might be slow as hell). Cheers, leo -----Ursprüngliche Nachricht----- Von: Brian Dittmer [mailto:[EMAIL PROTECTED] Gesendet: Montag, 30. Juli 2007 21:56 An: [email protected] Betreff: [fw-general] Best way to utilize Zend_Registry Hey guys, I'm fairly new to the Zend Framework and have a few questions. Firstly let me begin by describing the architecture I have in place. I have a set of domain classes, each of which represent a specific table in the database. I'm using a set of service classes I built to populate the domain objects. Pretty standard stuff. These service and domain classes all reside in their own specific lib directory so they can be used across our admin, intranet and public facing websites. My question is can I utilize the Zend_Registry to provide a single instance of each of my Service classes across each app domain (public, intranet, admin)? If so how would I go about initially populating the registry? I come from the Java world and there I'd typically be using the Spring framework to inject dependencies into and maintain my service classes. All of that would typically occur on startup of the servlet container. I'll be using a similiar technique to maintain an instance of Zend_Config and a few other special classes I have developed. Any help with this would be much appreciated! Brian Dittmer
