You are here

public function FrxPostgres::parseConnectionStr in Forena Reports 8

1 call to FrxPostgres::parseConnectionStr()
FrxPostgres::searchTableColumns in src/FrxPlugin/Driver/FrxPostgres.php

File

src/FrxPlugin/Driver/FrxPostgres.php, line 249
Postgres specific driver that takes advantage of native XML support

Class

FrxPostgres
Class FrxPostgres

Namespace

Drupal\forena\FrxPlugin\Driver

Code

public function parseConnectionStr() {
  $uri = @$this->conf['uri'];
  $uri = str_replace(';', ' ', $uri);
  $info = array();
  foreach (explode(' ', $uri) as $pairs) {
    if (strpos($pairs, '=') !== FALSE) {
      list($key, $value) = @explode('=', $pairs, 2);
      $info[trim($key)] = trim($value);
    }
  }
  return $info;
}