Config_Lite::setSection PHP Method

setSection() public method

set a given array with key/value pairs to a section, creates a new section if necessary.
public setSection ( string $sec, array $pairs ) : Config_Lite
$sec string Section
$pairs array Keys and Values as Array ('key' => 'value')
return Config_Lite
    public function setSection($sec, $pairs)
    {
        if (!is_array($this->sections)) {
            $this->sections = array();
        }
        if (!is_array($pairs)) {
            throw new Config_Lite_Exception_InvalidArgument('array expected.');
        }
        $this->sections[$sec] = $pairs;
        return $this;
    }