ah great! thanks for the reply.
I guess this would be cleaner than using a global variable.
Hector Virgen wrote:
>
> There are a couple ways to store the config. In the past I've stored it in
> Zend_Registry, which can be pulled out later at any time:
> // in bootstrap
> Zend_Registry::set('config', $config);
>
> // in controller
> $config = Zend_Registry::get('config');
>
> Another option is to store it directly in the front controller as a param:
>
> $front = Zend_Controller_Front::getInstance();
> $front->setParam('config', $config);
>
> --
> Hector
>
>
> On Tue, Aug 11, 2009 at 3:36 PM, christal <[email protected]> wrote:
>
>>
>> From the examples in the document, it looks like Zend_Config is
>> initialized
>> in the root index.php file. Now how do I access this instance from my
>> controller?
>>
>> class FooController extends Zend_Controller_Action
>> {
>> public function indexAction()
>> {
>> // I need my $config!!!!
>> }
>> }
>> --
>> View this message in context:
>> http://www.nabble.com/Where-is-my-Zend_Config----tp24926984p24926984.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Where-is-my-Zend_Config----tp24926984p24927549.html
Sent from the Zend Framework mailing list archive at Nabble.com.