Config_Lite::getSection PHP Method

getSection() public method

returns an array of options of the given section
public getSection ( string $sec, array $default = null ) : array
$sec string Section
$default array return default array if $sec is not set
return array
    public function getSection($sec, $default = null)
    {
        if (null === $this->sections && null === $default) {
            throw new Config_Lite_Exception_Runtime('configuration seems to be empty, no sections.');
        }
        if (isset($this->sections[$sec])) {
            return $this->sections[$sec];
        }
        if (null !== $default && is_array($default)) {
            return $default;
        }
        throw new Config_Lite_Exception_UnexpectedValue('section not found, no default array given.');
    }