protected function getConfig($key = null, $default = null) { if ($key !== null) { if (isset($this->config[$key])) { return $this->config[$key]; } else { return $default; } } return $this->config; }