Re: [fw-general] [ZF-General] Reading from XML file using ConfigXML

2007-07-19 Thread Simon Mundy
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

RE: [fw-general] [ZF-General] Reading from XML file using ConfigXML

2007-07-19 Thread Bill Karwin
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

Re: [fw-general] [ZF-General] Reading from XML file using ConfigXML

2007-07-19 Thread Simon Mundy
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.

Re: [fw-general] [ZF-General] Reading from XML file using ConfigXML

2007-07-19 Thread AmirBehzad Eslami
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

RE: [fw-general] [ZF-General] Reading from XML file using ConfigXML

2007-07-19 Thread Bill Karwin
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

Re: [fw-general] [ZF-General] Reading from XML file using ConfigXML

2007-07-19 Thread AmirBehzad Eslami
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

Re: [fw-general] [ZF-General] Reading from XML file using ConfigXML

2007-07-19 Thread Simon Mundy
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