public function setConfig($configOrKey, $config = null) {
        if ($config !== null) {
            $this->config[$configOrKey] = $config;
        }
        else {
            $this->config = ($configOrKey !== null ? $configOrKey : array());
        }
    }