cvs: pear /Config Config.php

From: Date: Fri, 22 Nov 2002 16:45:44 +0000
Subject: cvs: pear /Config Config.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-7535@lists.php.net to get a copy of this message
mansion Fri Nov 22 11:45:44 2002 EDT Modified files: /pear/Config Config.php Log: On my way to move the parsing and writing methods to Config instead of container. Need more time to think about this... Index: pear/Config/Config.php diff -u pear/Config/Config.php:1.5 pear/Config/Config.php:1.6 --- pear/Config/Config.php:1.5 Sat Oct 5 11:20:08 2002 +++ pear/Config/Config.php Fri Nov 22 11:45:44 2002 @@ -15,7 +15,7 @@ // | Author: Bertrand Mansion <bmansion@mamasam.com> | // +----------------------------------------------------------------------+ // -// $Id: Config.php,v 1.5 2002/10/05 15:20:08 mansion Exp $ +// $Id: Config.php,v 1.6 2002/11/22 16:45:44 mansion Exp $ require_once('PEAR.php'); @@ -78,12 +78,11 @@ $className = $GLOBALS['CONFIG_CONTAINERS'][$container][1]; $includeFile = $GLOBALS['CONFIG_CONTAINERS'][$container][0]; include_once ($includeFile); - $obj = new stdclass; - $this->container =& new $className('section', 'root', '', $obj); + $this->container =& new $className('section', 'root', ''); + $this->container->parent = null; if (is_array($options)) { $this->container->setOptions($options); } - return $this->container; } // end constructor /** @@ -96,6 +95,16 @@ { return in_array($container, array_keys($GLOBALS['CONFIG_CONTAINERS'])); } // end func isContainerRegistered + + /** + * Returns the root container for this config object + * @access public + * @return object root container object + */ + function &getRoot() + { + return $this->container; + } // end func getRoot /** * Parses the datasource contents

« previous php.pear.cvs (#7535) next »