Posted: Sat Mar 10, 2007 12:21 pm
باتريك 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:
In action methods on a Controller, you can then call:
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.
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);Code: Select all
$registry = $this->getInvokeArg('registry');