protected function getConfig($key = null)
    {
        if ($this->config === null) {
            $this->setConfig();
        }

        if (null === $key) {
            return $this->config;
        }

        if (!array_key_exists($key, $this->config)) {
            throw new InvalidArgumentException("key: '" . $key . "' is not set in configuration options.");
        }

        return $this->config[$key];
    }
protected function getConfig($key = null)
    {
        if ($this->config === null) {
            $this->setConfig();
        }

        if (null === $key) {
            return $this->config;
        }

        if (!array_key_exists($key, $this->config)) {
            throw new InvalidArgumentException("key: '" . $key . "' is not set in configuration options.");
        }

        return $this->config[$key];
    }
protected function getConfig ( $ key = null ) { if ( $ this -> config === null ) { $ this -> setConfig ( ) ; } if ( null === $ key ) { return $ this -> config ; } if ( ! array_key_exists ( $ key , $ this -> config ) ) { throw new InvalidArgumentException ( "key: '" . $ key . "' is not set in configuration options." ) ; } return $ this -> config [ $ key ] ; }
Gets the config options as an array, if a key is supplied then that keys options is returned.

@param string $key
@return array|null
@throws array|InvalidArgumentException
Gets the config options as an array if a key is supplied then that keys options is returned .