[dev]
great.url="www.google.com"
[test : dev]
great.url="www.yahoo.com"
[prod : test]
great.url="www.aol.com"
I have my own functions which return the Config of the environment that is used(DEV,TEST,OR PROD) .
Now my problem is $myclassinstance->getConfig()->great->url;
(when i say this it is returning url correctly in dev)
where as in test it is returning notice "Notice: Trying to get property of non-object in file test.php on line no 19" this error is coming due to empty
of this statement ($myclassinstance->getConfig()->great->url;)
.it is returning correctly in dev . What might be the problem.
It must be defaulting to dev. To fix it, you need to do something like this:
or depending on how you have things setup:
Then your code should work:
Documentation is here: http://framework.zend.com/manual/en/zend.config.adapters.ini.html