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.
>
>