public function set_config($key, $value) {
        if ($this->config === null) {
            $this->config = (object) array();
        }
        $this->config->$key = $value;
        $this->dirty = true;

        return $this;
    }