Page 2 of 2

Posted: Sat Mar 10, 2007 12:21 pm
by Maugrim_The_Reaper
باتريك is I believe the Arabic for the my name (internet search of dubious accuracy) - my real name at least ;). It's Pádraic (Irish Gaelic) which is related to Patrick in English. The pronunciation in Irish is like paw-drek, only the k is actually a soft c. "Maugrim" is just my internet handle :).

For you options - a new instance would work, but a Registry is a bit safer. Zend_Service_Namespace may see a name change of the class before a 1.0 ZF release.

Have you tried implenting the Registry?

To pass an object from the bootstrap to all Controller classes you can use the Zend_Controller_Front object to inject it using:

Code: Select all

$front->setParam('registry', $registryObject);
In action methods on a Controller, you can then call:

Code: Select all

$registry = $this->getInvokeArg('registry');
This mechanism is easily used to pass any object from the bootstrap to any Controller in your application. In fact you can even skip using a Registry for less "global" objects and use the setParam/getInvokeArg pairing for all objects only a Controller needs access to. Sessions of course can be used in a few places, so a Registry is a bit more suitable in this case.

Posted: Sun Mar 11, 2007 3:06 am
by the_last_tamurai
To your real name yes , but to your internet name is مجرم try to search for it. :lol:

I'll try the registery now. after I finish I'll edit the post