How could read application.ini on controller using zend framework

后端 未结 6 509
渐次进展
渐次进展 2021-01-06 23:50

I have these lines in my application.ini

how can I read user in my contrroler

resources.doctrine.dbal.connections.default.parameter         


        
6条回答
  •  借酒劲吻你
    2021-01-07 00:22

    I think you should use

    $this->getInvokeArgs('bootstrap');
    

    For more info see this chapter in manual.

    What about using

    $conf = $bootstrap->getOption('resources');
    $dbConf = $conf['doctrine']['dbal']['connections']['default']['parameters'];
    

提交回复
热议问题