Thursday, April 9, 2009

How to access the conf.ini fields

Xataface will load all the attributes in the conf.ini and use them to setup the application. But what happens if you decide to store some attributes in the conf.ini yourself that Xataface itself doesn't need, but you would like to use it during the execution of your code?

Say for example, you have this:



Here we have a database connection that you would like to use to connect to another database [other than the one that xataface is using to setup the application]. The code to access it:



The Xataface_Application object has attribute which you can access which then contains the entire conf.ini data in an array-array.

Very useful!

No comments: