Lakshman Tirlangi
Lakshman Tirlangi

Reputation: 103

How to read protected config values in zend framework

Hii...

I would like to read protected database values from config file in datagrid file, plz help how can I do that...thanx in advance.

Upvotes: -1

Views: 328

Answers (1)

JohnP
JohnP

Reputation: 50029

$db = Zend_Registry::get('db'); 

Usually what this code does is get at the DB variable in your registry. This code does not access the config file.

If you want to get at the config file use,

Zend_Registry::get('config')->YOUR->KEY->GOES->HERE

Upvotes: 0

Related Questions