From: Stig Bakken Date: Mon, 20 May 2002 10:42:47 +0000 (+0000) Subject: * added PEAR_Config::removeLayer() X-Git-Tag: RELEASE_0_10~88 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c7623ee86126145d96508d47db3a3d651834485;p=php * added PEAR_Config::removeLayer() --- diff --git a/pear/PEAR/Config.php b/pear/PEAR/Config.php index 8e3ed6dbd5..75d973208f 100644 --- a/pear/PEAR/Config.php +++ b/pear/PEAR/Config.php @@ -663,6 +663,29 @@ when installing packages without a version or state specified', 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; + } + // }}} // {{{ store([layer])