cvs: php4 /pear/PEAR Config.php

From: Date: Mon, 20 May 2002 10:42:48 +0000
Subject: cvs: php4 /pear/PEAR Config.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3964@lists.php.net to get a copy of this message
ssb Mon May 20 06:42:48 2002 EDT Modified files: /php4/pear/PEAR Config.php Log: * added PEAR_Config::removeLayer() Index: php4/pear/PEAR/Config.php diff -u php4/pear/PEAR/Config.php:1.19 php4/pear/PEAR/Config.php:1.20 --- php4/pear/PEAR/Config.php:1.19 Tue May 14 13:59:41 2002 +++ php4/pear/PEAR/Config.php Mon May 20 06:42:47 2002 @@ -16,7 +16,7 @@ // | Author: Stig Bakken <ssb@fast.no> | // +----------------------------------------------------------------------+ // -// $Id: Config.php,v 1.19 2002/05/14 17:59:41 cox Exp $ +// $Id: Config.php,v 1.20 2002/05/20 10:42:47 ssb Exp $ require_once 'PEAR.php'; @@ -658,6 +658,29 @@ { if (isset($this->configuration[$layer][$key])) { unset($this->configuration[$layer][$key]); + return true; + } + return false; + } + + // }}} + // {{{ removeLayer(layer) + + /** + * Temporarily remove an entire config layer. USE WITH CARE! + * + * @param string config key + * + * @param string (optional) config layer + * + * @return bool TRUE on success, FALSE on failure + * + * @access public + */ + function removeLayer($layer) + { + if (isset($this->configuration[$layer])) { + unset($this->configuration[$layer]); return true; } return false;

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