Get the current Connection configuration
@return models\Connection\Config
487041
public function getConfiguration(){
        $rest = $this->getService( self::API_CONNECTION_CONFIG);
        $rest->GET();

        return $rest->getResult( models\Connection\Config::class);
    }
1009151
public function getConfiguration()
    {
        if (is_null($this->_configuration)) {
            $this->_configuration = Configuration::get('config');
        }
        return $this->_configuration;
    }
998579
public function getConnection() {
        if (null === $this->connection) {
            $this->connection = $this->connect();
        }
        return $this->connection;
    }
707351
public function getAvailableConnections()
    {
        // Fetch stored credentials
        $storage = $this->localStorage->get('connections');
        $storage = $this->unifyMultiserversDeclarations($storage);

        // Merge with defaults from config file
        $configuration = $this->config->get('connections');
        $configuration = $this->unifyMultiserversDeclarations($configuration);

        // Merge configurations
        $connections = array_replace_recursive($configuration, $storage);

        return $connections;
    }
164375
public function getConfiguration(){
        $rest = $this->getService( self::API_NAT_DMZ);
        $rest->GET();

        return $rest->getResult( models\NAT\DmzConfig::class);
    }
855864
public function getConnection()
    {
        $repositoryConfig = $this->repositoryConfigurationProvider->getRepositoryConfig();
        // Taking provided connection name if any.
        // Otherwise, just fallback to the default connection.

        if (isset($repositoryConfig['search']['connection'])) {
            $doctrineConnectionId = sprintf('doctrine.dbal.%s_connection', $repositoryConfig['search']['connection']);
        } else {
            // "database_connection" is an alias to the default connection, set up by DoctrineBundle.
            $doctrineConnectionId = 'database_connection';
        }

        if (!$this->container->has($doctrineConnectionId)) {
            throw new InvalidArgumentException(
                "Invalid Doctrine connection '{$repositoryConfig['search']['connection']}' for repository '{$repositoryConfig['alias']}'." .
                'Valid connections are ' . implode(', ', array_keys($this->container->getParameter('doctrine.connections')))
            );
        }

        return $this->container->get($doctrineConnectionId);
    }
127712
public function getConnection()
    {
        if ($this->connection === null) {
            $this->connection = ConnectionManager::get('auditlog_elastic');
        }

        return $this->connection;
    }
852760
protected function getDefaultDatabaseConnectionConfig()
  {
    global $table_prefix;

    $default = [
      'driver'    => 'mysql',
      'host'      => getenv('DB_HOST'),
      'port'      => getenv('DB_PORT'),
      'database'  => getenv('DB_NAME'),
      'username'  => getenv('DB_USER'),
      'password'  => getenv('DB_PASSWORD'),
      'charset'   => getenv('DB_CHARSET'),
      'collation' => getenv('DB_COLLATE'),
      'prefix'    => getenv('DB_PREFIX') ?: $table_prefix,
      'timezone'  => getenv('DB_TIMEZONE') ?: '+00:00',
      'strict'    => getenv('DB_STRICT_MODE') ?: false,
    ];

    if (empty($default['database']) && defined('DB_NAME')) {
      $default['database'] = DB_NAME;
    }

    if (empty($default['username']) && defined('DB_USER')) {
      $default['username'] = DB_USER;
    }

    if (empty($default['password']) && defined('DB_PASSWORD')) {
      $default['password'] = DB_PASSWORD;
    }

    if (empty($default['host']) && defined('DB_HOST')) {
      $default['host'] = DB_HOST;
    }

    if (empty($default['charset']) && defined('DB_CHARSET')) {
      $default['charset'] = DB_CHARSET;
    }

    if (empty($default['collation'])) {
      if (defined('DB_COLLATE') && DB_COLLATE) {
        $default['collation'] = DB_COLLATE;
      } else {
        $default['collation'] = 'utf8_unicode_ci';
      }
    }

    return $default;
  }
121661
public function getConnection()
	{
		if ($this->_connection === null) {
			if (!isset(Yii::$app->redis)) {
				throw new InvalidConfigException(get_class($this)." expects a 'redis' application component");
			}
			$this->_connection = Yii::$app->redis;
		}
		return $this->_connection;
	}
782685
public function getCurrentConnectionKey()
    {
        $current = $this->getCurrentConnection();

        return $current ? $current->getConnectionKey() : $this->credentials->createConnectionKey();
    }
1320933
public function getConnection()
    {
        if (! $this->connection) {
            list($dns, $username, $password) = $this->connectionString();

            $this->setConnection(new \PDO($dns, $username, $password));
        }

        return $this->connection;
    }
34717
protected function getDatabaseConfig()
    {
        if ($this->app->config()['use_cache']) {
            $key = 'rails.ar.dbconfig';
            if ($dbConfig = $this->app->getService('rails.cache')->read($key)) {
                return $dbConfig;
            }
        }
        
        $connections = $this->getDatabaseConnections();
        if (!$connections) {
            return [[], null, null];
        }
        
        $config  = $this->app->config();
        
        if ($config['active_record']['allow_profiler'] === null) {
            $allowProfiler = ($config['environment'] == 'production' || $config['environment'] == 'test');
        } else {
            $allowProfiler = (bool)$config['active_record']['allow_profiler'];
        }
        
        $options = [
            'allowProfiler' => $allowProfiler
        ];
        
        if (isset($connections[$config['environment']])) {
            $defaultConnction = $config['environment'];
        } elseif (isset($connections['default'])) {
            $defaultConnction = 'default';
        } else {
            $defaultConnction = key($connections);
        }
        
        $dbConfig = [
            $connections,
            $defaultConnction,
            $options
        ];
        
        if ($this->app->config()['use_cache']) {
            $this->app->getService('rails.cache')->write($key, $dbConfig);
        }
        
        return $dbConfig;
    }
1280786
protected function _connection() {
		if ($this->_connection) {
			return $this->_connection;
		}
		$host = "{$this->_config['protocol']}://{$this->_config['host']}";

		if ($this->_connection = fsockopen($host, $this->_config['port'], $message, $code)) {
			return $this->_connection;
		}
		throw new NetworkException("Growl connection failed: (`{$code}`) `{$message}`.");
	}
1166910
public function getConnectionConfig($name)
    {
        $name = $name ?: $this->default;

        if (!is_array($config = Arr::get($this->config, $name)) && !$config) {
            throw new InvalidArgumentException("Connection [$name] not configured.");
        }

        return $config;
    }
1191645
public function getConnection()
    {
        if ($chosenConn = $this->connections->pop()) {
            $this->connections->push($chosenConn);

            return $chosenConn;
        }
    }
117034
protected function _getConf()
    {
        // retrieve and cache config
        $services = $this->services();

        /** @var aSapi $config */
        $config   = $services->get('/sapi');
        $orig = $config   = $config->config();
        /** @var DataEntity $config */
        $config   = $config->get(\Module\Authorization\Module::CONF, array());

        if (!isset($config[self::CONF]) && !is_array($config[self::CONF]))
            return null;


        $config   = $config[self::CONF];
        return $config;
    }
1335895
public function connect()
    {
        if ($this->connection != null) {
            $this->disconnect();
        }

        if ($this->config['persistent'] == true) {
            $tmp = null;
            $this->connection = @pfsockopen($this->config['host'], $this->config['port'], $errNum, $errStr, $this->config['timeout']);
        } else {
            $this->connection = fsockopen($this->config['host'], $this->config['port'], $errNum, $errStr, $this->config['timeout']);
        }

        if (!empty($errNum) || !empty($errStr)) {
            $this->error($errStr, $errNum);
        }

        $this->connected = is_resource($this->connection);

        return $this->connected;
    }