original_string: public static function setConfig($key, $config = null)
      {
          if (is_array($config)) {
              $config['name'] = $key;
          }
  
          static::_setConfig($key, $config);
      }
code: public static function setConfig($key, $config = null)
      {
          if (is_array($config)) {
              $config['name'] = $key;
          }
  
          static::_setConfig($key, $config);
      }
code_tokens: public static function setConfig ( $ key , $ config = null ) { if ( is_array ( $ config ) ) { $ config [ 'name' ] = $ key ; } static :: _setConfig ( $ key , $ config ) ; }
docstring: Configure a new connection object.
  
  The connection will not be constructed until it is first used.
  
  @param string|array $key The name of the connection config, or an array of multiple configs.
  @param array|null $config An array of name => config data for adapter.
  @return void
  @throws \Cake\Core\Exception\Exception When trying to modify an existing config.
  @see \Cake\Core\StaticConfigTrait::config()
docstring_tokens: Configure a new connection object .