Actually, there is one time this will not work. If you are trying to do
this while you are still bootstrapping, you cannot get the bootstrap, as
it has not yet been added to the parameters of the front controller.
See the thread I started yesterday.
Regards,
- Doug
On Wed, 2011-10-05 at 22:15 +0200, Jurian Sluiman wrote:
> On Wednesday 05 October 2011 22:07:54 Mike Wright wrote:
> > Hi all,
> >
> > I have a class, My_Stupid_Class, that doesn't extend anything. Given
> > that, how do I access my bootstrap resources?
> >
> > Note the class name. That's about how I feel right now ;/
> >
> > Thank you...
>
> In all cases, using the frontcontroller will definitely work:
>
> $bootstrap = Zend_Controller_Front::getInstance()->getParam('bootstrap');
>
> In other cases (action controllers, action helpers etc) it can be done
> easier,
> but in a class just on its own, this is the easiest solution.
>
> Regards, Jurian
>
--
Douglas Wade Needham - KA8ZRT UN*X Consultant & UW/BSD kernel programmer
Email: cinnion @ ka8zrt . com http://www.ka8zrt.com
Disclaimer: My opinions are my own. Since I don't want them, why
should my employer, or anybody else for that matter!
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]