public function get($key = null, $default = null)
    {
        if (is_null($key)) {
            return $this->config;
        }

        if (isset($this->config[$key])) {
            return $this->config[$key];
        }

        $tmp = $this->config;
        foreach (explode('.', $key) as $segment) {
            if (!is_array($tmp) || !array_key_exists($segment, $tmp)) {
                return $default;
            }

            $tmp = $tmp[$segment];
        }

        return $tmp;
    }