patConfiguration < Overview >  



patConfiguration is an interface to access (read AND write) XML based configuration files via PHP. Furthermore it can convert your XML config files into PHP config files.
Furthermore it can convert your XML config files into PHP config files. With the use of extensions it allows you to retrieve fully configured objects from your configuration.
Current Version : v2.0.0
Released : 2005-08-13
Maintainer : Stephan Schmidt
Developer(s) : Stephan Schmidt
License : LGPL

Why should I use patConfiguration?
Using XML based configuration files has several advantages: Your configuration can be edited using any text editor, they can easily be validated using a dtd or xml schema, they are easy to read and configurations can easily be extended.
Features
patConfiguration is quite similar to the configuration reader i3conf by iternum GmbH, which was implemented in Java, but extends the features.
Currently the following features are implemented:

several types for configuration values are supported: string, boolean, double, integer and array.

Automatic conversion from strings to bools, integers, arrays or doubles

identify a configuration value via its path (similar to DOM or XPath)

references to other configuration options in your config file, e.g. base a directory name on a basedir set in the same configuration

extend patConfiguration so it returns fully operational objects instead of simple config values (extension for patDbc, patUser and patTemplate are already implemented)

assign a certain namespace to your custom extensions

dynamically include your extensions (or any other files) via a configuration option

automatic creation of multidimensional array

unlimited tag depth

fetch several config options using wildcards

direct access to values in an array

modify and save config files in XML (or even create new ones)

convert XML config files into PHP config files where all options are stored in an array

uses caching, so XML files do not have to be parsed every time

use external entities to include other XML configurations

easy-to-use API
patConfiguration in Java
I ported the XML-functionality of patConfiguration to Java. The project XJConf is available from my website java.schst.net.

Partnersites
PHP Application Tools

© 2001-2006
pat is watching you!

Last Updated: 2005-08-09 19:29:43 Jump to the top of the page (of course only if you're far enough down...)