Config class: new parsers and RFC

From: Date: Fri, 06 Sep 2002 22:03:19 +0000
Subject: Config class: new parsers and RFC
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-8899@lists.php.net to get a copy of this message
Hi all, I have added a few new parsers to my config class: - Apache.php This container parses standard apache .conf files like httpd.conf. It handles sections and subsections correctly as well as comments, blank lines and multiple directives with the same name. - IniFile.php This container uses the parse_ini_file function to parse php .ini files. It doesn't care or keep comments but is faster than the following. It keeps track of the sections. - IniCommented.php This container parses php .ini files using regular expressions. It keeps the comments and blank lines in your ini files as well as sections. - GenericConf.php This container parses generic .conf file like the ones of htdig.conf or anything you can think of... It is configurable, so you can use your own chars to define comment lines, equality and line feeds. It uses regular expressions. It keeps comments and blank lines as well as sections. - PHPArray.php This container uses a php array and convert it to a config container. It works with array like the ones in horde project. Ex: <?php $conf['storage']['driver'] = 'sql'; $conf['storage']['params']['phptype'] = 'mysql'; $conf['storage']['params']['hostspec'] = 'localhost'; $conf['storage']['params']['username'] = 'horde'; $conf['storage']['params']['password'] = 'hordepass'; $conf['storage']['params']['database'] = 120; $conf['menu']['apps'] = array('imp', 'turba'); ?> No I would like to know if it is ok for me to COMMIT the new package and WHERE, as I didn't care about backward compatibility with the older pear Config class for many good reasons. If you want to review the code, it's here: http://www.mamasam.com/Config/index.html Thanks, Bertrand Mansion Mamasam

« previous php.pear.dev (#8899) next »