protected function getPgClient() {
        if (!isset($this->_pgClient)) {
            $config = [
                'dbCredentials' => [
                    'host' => $this->host,
                    'port' => $this->port,
                    'user' => $this->username,
                    'password' => $this->password,
                    'database' => $this->database,
                ],
                //'autoDisconnect' => true,
                //'maxConnections' => 5,
                'loop' => Reaction::$app->loop
            ];
            $this->_pgClient = new PgClient($config);
        }
        return $this->_pgClient;
    }
protected function getPgClient() {
        if (!isset($this->_pgClient)) {
            $config = [
                'dbCredentials' => [
                    'host' => $this->host,
                    'port' => $this->port,
                    'user' => $this->username,
                    'password' => $this->password,
                    'database' => $this->database,
                ],
                //'autoDisconnect' => true,
                //'maxConnections' => 5,
                'loop' => Reaction::$app->loop
            ];
            $this->_pgClient = new PgClient($config);
        }
        return $this->_pgClient;
    }
protected function getPgClient ( ) { if ( ! isset ( $ this -> _pgClient ) ) { $ config = [ 'dbCredentials' => [ 'host' => $ this -> host , 'port' => $ this -> port , 'user' => $ this -> username , 'password' => $ this -> password , 'database' => $ this -> database , ] , //'autoDisconnect' => true, //'maxConnections' => 5, 'loop' => Reaction :: $ app -> loop ] ; $ this -> _pgClient = new PgClient ( $ config ) ; } return $ this -> _pgClient ; }
Get PgClient instance
@return PgClient
Get PgClient instance