o:[EMAIL PROTECTED]
Sent: Thursday, July 19, 2007 6:33 PM
To: Bill Karwin
Cc: fw-general@lists.zend.com
Subject: Re: [fw-general] [ZF-General] Reading from XML file using
ConfigXML
Bill Karwin wrote:
$db = Zend_Db::factory($config->database->type, $config->database-
>params);
I
egards,
Bill Karwin
From: AmirBehzad Eslami [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 19, 2007 6:33 PM
To: Bill Karwin
Cc: fw-general@lists.zend.com
Subject: Re: [fw-general] [ZF-General] Reading from XML file
using ConfigXML
I'm not 100% sure but I'm taking a good guess that it's the best way
to ensure functionality for the config files remains reasonable
similar. You can't, for example, specify attributes for
Zend_Config_Array nor Zend_Config_Ini without significantly altering
the way that they're structured.
Bill Karwin wrote:
$db = Zend_Db::factory($config->database->type, $config->database->params);
I'm unable to run the code, It seems that
you forgot to convert from an object
to an array. Or perhpas I'm missing something?
On 7/20/07, Bill Karwin <[EMAIL PROTECTED]> wrote:
I would organize m
I would organize my config like this:
mysqli
localhost
3306
root
TRUE
Then it's easy to use like this:
$db = Zend_Db::factory($co
Thanks a lot Simon!
I'm afraid to hear that Zend_Config ignores any element attribute.
Perhaps this is because of its SimpleXML origin. I'm not certain on this.
Anyway, I come up with:
Config.xml
~~
mysqli
localhost
Zend_Config ignores any element attributes. You'd be better off adding
mysqli
and then passing it across like:-
$db = Zend_Db::factory($config->database->type, $config->database-
>toArray());
Hi,
Suppose we have an XML file like the following one:
lo