protected function updateSetting($settings, $parts, $value)
    {
        $part = current(array_slice($parts, 0, 1));

        if ((string) intval($part) == $part) {
            $part = intval($part);
        }
        
        if (count($parts) > 0) {
            $parts = array_slice($parts, 1);
            
            if (!isset($settings[$part])) {
                $settings[$part] = array();
            }

            $settings[$part] = $this->updateSetting($settings[$part], $parts, $value);
        } else {
            $settings = $value;
        }
        
        return $settings;
    }