2009年8月16日星期日

Re: [fw-mvc] Zend_Config

-- Erdal YAZICIOGLU <erdal.yazicioglu@gmail.com> wrote
(on Sunday, 09 August 2009, 04:46 PM +0300):
> As I understand from Zf 1.8, it automatically loads the bootstap variables
> without calling $config = new Zend_Config_Ini('../configs/application.ini',
> 'production');
>
> Now my question is I want to assign some constants in config.ini like web site
> name, messages, etc. How can I manage this?

It's not quite happening as you think it does.

Zend_Application expects that you pass it either an array of options, a
Zend_Config object, or a path to a configuration file (Zend_Application
will then auto-determine what type of configuration file it is based on
the file suffix).

Neither Zend_Config nor Zend_Application define any constants.
Zend_Config, however, can *use* already defined constants in order to
populate options.

--
Matthew Weier O'Phinney
Project Lead | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: