Config_Lite::remove PHP Method

remove() public method

remove a section or an option of a section
public remove ( string $sec, string $key = null ) : void
$sec string Section
$key string Key
return void
    public function remove($sec, $key = null)
    {
        if (null === $key) {
            $this->removeSection($sec);
            return;
        }
        // global value
        if (null === $sec && $key !== null) {
            if (!isset($this->sections[$key])) {
                throw new Config_Lite_Exception_UnexpectedValue('No such global Value.');
            }
            unset($this->sections[$key]);
            return;
        }
        if (!isset($this->sections[$sec])) {
            throw new Config_Lite_Exception_UnexpectedValue('No such Section.');
        }
        unset($this->sections[$sec][$key]);
    }