original_string: 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];
      }
code: 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];
      }
code_tokens: 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 ] ; }
docstring: 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
docstring_tokens: Gets the config options as an array if a key is supplied then that keys options is returned .