public function getString($sec, $key, $default = null)
{
if (null === $this->sections && null === $default) {
throw new Config_Lite_Exception_Runtime('configuration seems to be empty, no sections.');
}
if (null === $sec && array_key_exists($key, $this->sections)) {
return stripslashes($this->sections[$key]);
}
if (array_key_exists($key, $this->sections[$sec])) {
return stripslashes($this->sections[$sec][$key]);
}
if (null !== $default) {
return $default;
}
throw new Config_Lite_Exception_UnexpectedValue('key not found, no default value given.');
}