ezphpconfig 0.4

Generates a set of php configuration classes from a supplied xml file. You can then access your configuration values very quickly without having to parse the xml file on every request.

This class can be used to generate a PHP class from an XML file. It is a professional PHP code generator. The element (tag) names become property names and the text contained in the elements becomes the property's value. It also supports nested elements. If the generated php file is older than the xml file, it is re-generated using the data in the newer xml file.

For example, this xml file:

 

<config>
    <database>
        <connString>This is my connection string</connString>
    </database> </config>

Would be accessed in php as follows (after the ConfigurationLoader.update method had been called:

$config = new config();
echo $config->database->connString;

This class also supports array types using the <item> element inside an element whose type attribute is set to "array". Please read the documentation and see example xml files for more details. Once you have your configuration classes you can get or set the values as required.

 

Requirement: PHP 5.0 or higher

License type: GNU General Public License (GPL)
Date added: 3 years, 6 months 8 days ago | Last updated: 3 years, 3 months 27 days ago

More popular XML

This is actually one of the most advanced image hosting script. The imagetize key features: SEO, Ads Ready, Admin

Listing Files

  • README
  • 6.2 KB
  • 09/23/2008 05:44:45
  • COPYING
  • 35.0 KB
  • 09/23/2008 05:44:45
Hot Scripts
Sponsors