Permalink
Browse files

#4 remove global key

  • Loading branch information...
1 parent a7c7517 commit 6e8184eb936afc5fadf530e86b703c95923309c6 pce committed Jul 2, 2012
Showing with 11 additions and 0 deletions.
  1. +11 −0 Config/Lite.php
View
@@ -511,6 +511,17 @@ public function remove($sec, $key=null)
if ((null === $key)) {
$this->removeSection($sec);
}
+ // global value
+ if (null === $sec && $key !== null) {
+ if (!isset($this->sections[$key])) {
+ throw new Config_Lite_Exception_UnexpectedValue(
+ 'No such global Value.'
+ );
+ return;
+ }
+ unset($this->sections[$key]);
+ return;
+ }
if (!isset($this->sections[$sec])) {
throw new Config_Lite_Exception_UnexpectedValue('No such Section.');
}

0 comments on commit 6e8184e

Please sign in to comment.