Vsch\TranslationManager\Manager::getConnectionInfo PHP Method

getConnectionInfo() public method

public getConnectionInfo ( $connection, $key = null, $default = null )
    public function getConnectionInfo($connection, $key = null, $default = null)
    {
        if ($key === null) {
            return $this->config(self::DB_CONNECTIONS_KEY);
        }
        $db_connections = $this->config(self::DB_CONNECTIONS_KEY);
        $environment = \App::environment();
        $db_connection = $connection !== null && array_key_exists($environment, $db_connections) && array_key_exists($connection, $db_connections[$environment]) ? $db_connections[$environment][$connection] : null;
        $value = $db_connection && array_key_exists($key, $db_connection) ? $db_connection[$key] : $default;
        return $value;
    }