public function getConfig($key = null, $default = null)
    {
        if (!$this->_configInitialized) {
            $this->_config = $this->_defaultConfig;
            $this->_configInitialized = true;
        }

        $return = $this->_configRead($key);

        return $return === null ? $default : $return;
    }
public function getConfig($key = null, $default = null)
    {
        if (!$this->_configInitialized) {
            $this->_config = $this->_defaultConfig;
            $this->_configInitialized = true;
        }

        $return = $this->_configRead($key);

        return $return === null ? $default : $return;
    }
public function getConfig ( $ key = null , $ default = null ) { if ( ! $ this -> _configInitialized ) { $ this -> _config = $ this -> _defaultConfig ; $ this -> _configInitialized = true ; } $ return = $ this -> _configRead ( $ key ) ; return $ return === null ? $ default : $ return ; }
Returns the config.

### Usage

Reading the whole config:

```
$this->getConfig();
```

Reading a specific value:

```
$this->getConfig('key');
```

Reading a nested value:

```
$this->getConfig('some.nested.key');
```

Reading with default value:

```
$this->getConfig('some-key', 'default-value');
```

@param string|null $key The key to get or null for the whole config.
@param mixed $default The return value when the key does not exist.
@return mixed Config value being read.
Returns the config .