cvs: pear /Config Config.php
| From: | Bertrand Mansion | Date: | Tue, 17 Dec 2002 17:11:37 +0000 |
| Subject: | cvs: pear /Config Config.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-7917@lists.php.net to get a copy of this message | ||
mansion Tue Dec 17 12:11:37 2002 EDT
Modified files:
/pear/Config Config.php
Log:
Completed implementation of writeConfig
Index: pear/Config/Config.php
diff -u pear/Config/Config.php:1.9 pear/Config/Config.php:1.10
--- pear/Config/Config.php:1.9 Tue Dec 17 10:37:38 2002
+++ pear/Config/Config.php Tue Dec 17 12:11:37 2002
@@ -15,7 +15,7 @@
// | Author: Bertrand Mansion <bmansion@mamasam.com> |
// +----------------------------------------------------------------------+
//
-// $Id: Config.php,v 1.9 2002/12/17 15:37:38 mansion Exp $
+// $Id: Config.php,v 1.10 2002/12/17 17:11:37 mansion Exp $
require_once('PEAR.php');
require_once('Config/Container.php');
@@ -205,7 +205,7 @@
* @access public
* @return mixed PEAR_Error on error or true if ok
*/
- function writeConfig($datasrc = null, $configType = '')
+ function writeConfig($datasrc = null, $configType = '', $options = array())
{
if ($error = $this->_checkDatasrc($datasrc)) {
return PEAR::raiseError($error.'::writeConfig.', null, PEAR_ERROR_TRIGGER,
E_USER_WARNING);
@@ -213,8 +213,11 @@
if ($error = $this->_checkConfigType($configType)) {
return PEAR::raiseError($error.'::writeConfig.', null, PEAR_ERROR_TRIGGER,
E_USER_WARNING);
}
+ if (count($options) > 0) {
+ $this->parserOptions = $options;
+ }
- return $this->container->writeDatasrc($this->datasrc, $this->configType);
+ return $this->container->writeDatasrc($this->datasrc, $this->configType,
$this->parserOptions);
} // end func writeConfig
} // end class Config
?>