Conf Changes (#138)
Manuel Holtgrewe <[email protected]> Tue, 08 Mar 2005 18:36:40 +0100
| Newsgroups | gmane.comp.lib.binarycloud.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I'll check in a new version of Conf in some minutes. You can find the
ticket here: [1]. Note that I also incorporated Ticket #122 (see [2]).
I'll also check in changed base classes in binarycloud/, vortex/ and
testsite/app. I also changed the build.xml in testsite - though not the
one in bootstrap yet since we will drop Phing soon anyway.
I have only added storing configuration in XML files for now. I have
also added a ticket for this task [3].
Conf usage changes from
~ $conf =& Conf::getInstance('vortex/rbacadmin.php');
~ $conf->get('domain_name');
to
~ $conf =& Conf::getInstance();
~ $conf->get('/domain_name/section/param');
You can tweak configuration caching (activated and on a per-file-base by
default) by doing the following - before you $project->startup() or in a
custom Project class - the following way:
~ include_once('conf/Conf.php');
~ $conf =& Conf::getConf();
~ $conf->setCacheMode(BC_CONF_NOCACHE);
To upgrade your own code to use the new style conf, you have to do the
following:
- - Replace "Conf::getInstance(.*?) Conf::getInstance()"
- - Replace "->getConf('" by "->getConf('/"
- - Replace "name=" with "id=" in your conf.xml files
- - Replace "raw" typed configuration settings by "@COSTANT_NAME@" or
replace it with something in your PHP code.
I hope that's all.
Regards,
Manuel
[1] https://svn.binarycloud.com/trac/ticket/138
[2] https://svn.binarycloud.com/trac/ticket/122
[3] https://svn.binarycloud.com/trac/ticket/141
- --
GPG key: http://www.ggnore.net/~mholtgrewe/personal/files/public_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCLeKo+Z0vV1m84RkRAh98AJ4mHyi1TOn2Hx3uZuZle7q6kntwKACfWcxn
kifxCQhrOdsQjEmZ5qpXyWc=
=dBIT
-----END PGP SIGNATURE-----
_______________________________________________
dev mailing list
dev-PnctHDZWAvB/Cz2I37pSEPZ4XP/[email protected]
http://lists.binarycloud.com/mailman/listinfo/dev