2. way sounds good. but how can i access frontController's params from
controller and view script ?
i dont like write that codes for each Action
----------------------------------
$config = Zend_Registry::get('Zend_Config');
$cache = Zend_Registry::get('Zend_Cache');
$locale = Zend_Registry::get('Zend_Locale');
..
.
$this->view->config  = $config;
$this->view->cache = $cache;
$this->view->locale = $locale;
..
.
---------------------------------
2009/4/8 keith Pope <mute.p...@googlemail.com>

> Maybe use the registry for that, so have a bootstrap class resource
> that fetches the plugin resources:
>
> protected _initRegistry()
> {
>    $this->bootstrap('db');
>    Zend_Registry::set('dbResource', $this->getPluginResource('db'));
> }
>
> Or you could pass them as params to the front controller, which would
> make them accessible inside controllers:
>
> protected _initFrontControllerExtras()
> {
>    $this->bootstrap('frontcontroller');
>    $this->frontController->setParam('x','xxx');
>    // or
>
>  
> $this->getPluginResource('frontController')->getFrontController()->setParam('x','xxx');
> }
>
> Hope this helps
>
> Keith
>
> 2009/4/8 Elvin Şiriyev <el...@siriyev.net>:
> > hi, i used Zend_Application with Zend_Application_Resource_*.
> > how can i access to that objects from my Controller and view?
> >
> > for example is there any way to access Zend_Application_Resource_
> > Navigation 's  getContainer() method from controller like
> > $this->navigation->getContainer() or $this->db, $this->layout,
> $this->locale
> > or another easy way ?
> >
> > thanks
> >
> > --
> > Elvin Şiriyev
> > http://elvin.siriyev.net
> >
> > --
> > Elvin Şiriyev
> > http://elvin.siriyev.net
> >
>
>
>
> --
> ----------------------------------------------------------------------
> [MuTe]
> ----------------------------------------------------------------------
>



-- 
Elvin Şiriyev
http://elvin.siriyev.net

Reply via email to