@constructor

@param {String} name - Name of the connection
@param {Object} config - Config of the connection
9015
function(name, config)
{
    this.mongo    = require('mongodb');
    this.mongoose = require('mongoose');

    this.config = config;
    this.name   = name;

    this.connection = undefined;
    this.orm        = {
        instance : undefined,
        models   : {}
    };
}
840856
def config_for(name)
      name = name.to_s
      check_for_changes(name) if auto_check?(name)
      data = get_config_data(name)
      logger.debug "config_for(#{name.inspect}) => #{data.inspect}"
      data
    end
387676
function Namespace(server, name){
  this.name = name;
  this.server = server;
  this.sockets = {};
  this.connected = {};
  this.fns = [];
  this.ids = 0;
  this.rooms = [];
  this.flags = {};
  this.initAdapter();
}
1344062
def set_name(self, name):
        """"""
        if not name:
            name = ''
        self._client['config']['name'] = name
        yield from self._server.client_name(self.identifier, name)
228366
public function make($config, $name = null)
    {
        $config = $this->parseConfig($config, $name);

//        if (isset($config['read'])) {
//            return $this->createReadWriteConnection($config);
//        }
        return $this->createSingleConnection($config);
    }
1038487
function WithName(name, Base) {
  let BaseClass =  Base || Therror;
  return class extends BaseClass {
    constructor(err, msg, prop) {
      super(err, msg, prop);
      this.name = name;
    }
  };
}
681851
public void addConnector(String name, ConnectorConfiguration connectorConfig) throws Exception {
        ModelNode fullRequest;

        final Address connectorAddress = Address.root().add(SUBSYSTEM, SUBSYSTEM_WEB, CONNECTOR, name);
        final ModelNode connectorRequest = createRequest(ADD, connectorAddress);
        setPossibleExpression(connectorRequest, "executor", connectorConfig.getExecutor());
        setPossibleExpression(connectorRequest, "max-connections", connectorConfig.getMaxConnections());
        setPossibleExpression(connectorRequest, "max-post-size", connectorConfig.getMaxPostSize());
        setPossibleExpression(connectorRequest, "max-save-post-size", connectorConfig.getMaxSavePostSize());
        setPossibleExpression(connectorRequest, "protocol", connectorConfig.getProtocol());
        setPossibleExpression(connectorRequest, "proxy-name", connectorConfig.getProxyName());
        setPossibleExpression(connectorRequest, "proxy-port", connectorConfig.getProxyPort());
        setPossibleExpression(connectorRequest, "scheme", connectorConfig.getScheme());
        setPossibleExpression(connectorRequest, "socket-binding", connectorConfig.getSocketBinding());
        setPossibleExpression(connectorRequest, "redirect-port", connectorConfig.getRedirectPort());
        setPossibleExpression(connectorRequest, "enabled", String.valueOf(connectorConfig.isEnabled()));
        setPossibleExpression(connectorRequest, "enable-lookups", String.valueOf(connectorConfig.isEnableLookups()));
        setPossibleExpression(connectorRequest, "secure", String.valueOf(connectorConfig.isSecure()));

        SSLConfiguration sslConfig = connectorConfig.getSslConfiguration();
        if (sslConfig != null) {
            final Address sslAddress = connectorAddress.clone().add(SSL, "configuration"); // MUST be "configuration"
            final ModelNode sslRequest = createRequest(ADD, sslAddress);
            setPossibleExpression(sslRequest, "ca-certificate-file", sslConfig.getCaCertificateFile());
            setPossibleExpression(sslRequest, "ca-certificate-password", sslConfig.getCaCertificatePassword());
            setPossibleExpression(sslRequest, "ca-revocation-url", sslConfig.getCaRevocationUrl());
            setPossibleExpression(sslRequest, "certificate-file", sslConfig.getCertificateFile());
            setPossibleExpression(sslRequest, "certificate-key-file", sslConfig.getCertificateKeyFile());
            setPossibleExpression(sslRequest, "cipher-suite", sslConfig.getCipherSuite());
            setPossibleExpression(sslRequest, "key-alias", sslConfig.getKeyAlias());
            setPossibleExpression(sslRequest, "keystore-type", sslConfig.getKeystoreType());
            setPossibleExpression(sslRequest, "name", sslConfig.getName());
            setPossibleExpression(sslRequest, "password", sslConfig.getPassword());
            setPossibleExpression(sslRequest, "protocol", sslConfig.getProtocol());
            setPossibleExpression(sslRequest, "session-cache-size", sslConfig.getSessionCacheSize());
            setPossibleExpression(sslRequest, "session-timeout", sslConfig.getSessionTimeout());
            setPossibleExpression(sslRequest, "truststore-type", sslConfig.getTruststoreType());
            setPossibleExpression(sslRequest, "verify-client", sslConfig.getVerifyClient());
            setPossibleExpression(sslRequest, "verify-depth", sslConfig.getVerifyDepth());
            fullRequest = createBatchRequest(connectorRequest, sslRequest);
        } else {
            fullRequest = connectorRequest;
        }

        final ModelNode response = execute(fullRequest);
        if (!isSuccess(response)) {
            throw new FailureException(response, "Failed to add new connector [" + name + "]");
        }
        return;
    }
989876
public function make( array $config, $name = null )
	{
		$config = $this->parseConfig( $config, $name );

		if ( isset( $config['read'] ) )
			return $this->createReadWriteConnection( $config );

		return $this->createSingleConnection( $config );
	}
1194541
async def set_config(cls, name: str, value):
        
        return await cls._handler.set_config(name=[name], value=[value])
527614
public function attachPort(string $name, $config): void
    {
        if (isset($this->attachedNames[strtolower($name)])) {
            throw new \InvalidArgumentException("The add listen port server [$name] has been exists!");
        }

        if (\is_array($config)) {
            $class = Arr::remove($config, 'listener');

            if (!$class) {
                throw new \InvalidArgumentException("Please setting the 'listener' class for the port server: $name");
            }

            $cb = new $class($config);

            if (!$cb instanceof PortListenerInterface) {
                throw new \InvalidArgumentException(
                    'The event handler must implement of ' . PortListenerInterface::class
                );
            }
        } elseif ($config instanceof \Closure || $config instanceof PortListenerInterface) {
            $cb = $config;

        } else {
            throw new \InvalidArgumentException('The 2th argument type only allow [array|\Closure|InterfacePortListener].');
        }

        $this->attachedNames[$name]     = true;
        $this->attachedListeners[$name] = $cb;
    }
1306999
function(name, config)
{
    var self    = this;
    this.config = config;
    this.name   = name;

    this.pool = undefined;
    this.orm  = {
        instance : undefined,
        models   : {}
    };
}
764356
function(name) {
    var cls = new Class(name,{
      inherits: Error,
      constructor: function(message) {
        this.name = name;
        this.message = message;
      },
    });
    return cls.toFunction();
  }
199609
function init(path, name) {  // {{{2
/**
 * Class constructor
 *
 * @param name {String} Name of HttpContent instance
 * @param path {String} Path to content
 *
 * @method init
 */

  this.modules = {};
  this.handlers = {};
  this.scripts = [];
  this.styles = [];

  this.path = path || Path.dirname(this.O.module.filename);
  this.name = name || this.O.packageName || this.O.package.packageName;

//  O.log.debug('Content', this.toString());

  Http.addContent(this);

  this.addFiles && this.addFiles();
}
931806
public static function createRepositoryConnection($config, $name)
    {
        /**
         * Create faker, middleware or pdo repository.
         */
        $repository = static::getRepositoryByConfig($config, $name);

        /**
         * Bind repository to context so we can reuse it later.
         */
        if ($pos = strpos($name, ':')) {
            /**
             * We're probably initializing write connection.
             */
            $originalAlias = Repository::class . '.' . substr($name, 0, $pos);
            $originalRepository = context()->get($originalAlias);
            $alias = substr($name, $pos + 1);
            $originalRepository->addAlias($alias, $repository);
            $repository->addAlias($alias == 'write' ? 'read' : 'write', $originalRepository);
        } else {
            context()->bindIfNot(Repository::class, $repository);
        }

        context()->bind(Repository::class . '.' . $name, $repository);

        return $repository;
    }
1112190
function config(name) {
  const args = [].slice.call(arguments, 1)
  const modules = {
    ActionSheet: $actionSheet,
    Loading: $loading,
    Toast: $toast,
    Dialog: $dialog
  }
  const module = components[name] || modules[name]
  if (typeof module.config === 'function') {
    module.config.apply(null, args)
  }
  else {
    console.warn(`${name}.config is not a function`)
  }
}
523575
function (config) {
        if (typeof config !== 'object') {
            throw new Error('Invalid Route Config');
        }
        if (typeof config.route !== 'string') {
            var name_1 = config.name || '(no name)';
            throw new Error('Invalid Route Config for "' + name_1 + '": You must specify a "route:" pattern.');
        }
        if (!('redirect' in config || config.moduleId || config.navigationStrategy || config.viewPorts)) {
            throw new Error('Invalid Route Config for "' + config.route + '": You must specify a "moduleId:", "redirect:", "navigationStrategy:", or "viewPorts:".');
        }
    }
656667
function connection($name)
    {

        // Check if connection is already loaded.

        if ($this->isLoaded($name)) {

            $this->connection = $this->connections[$name];

            return $this->newQuery($name);

        }

        // Create a new connection.

        if (array_key_exists($name, $this->config["connections"])) {

            $config = $this->config["connections"][$name];

            // Instantiate a new ClientBuilder
            $clientBuilder = ClientBuilder::create();

            $clientBuilder->setHosts($config["servers"]);

            $clientBuilder = self::configureLogging($clientBuilder,$config);

            if (!empty($config['handler'])) {
                $clientBuilder->setHandler($config['handler']);
            }

            // Build the client object
            $connection = $clientBuilder->build();

            $this->connection = $connection;

            $this->connections[$name] = $connection;

            return $this->newQuery($name);
        }

        $this->app->abort(500, "Invalid elasticsearch connection driver `" . $name . "`");
    }