You are here

public function FrxPDO::parseConnectionStr in Forena Reports 8

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

File

src/FrxPlugin/Driver/FrxPDO.php, line 87
General database engine used to do sql queries.

Class

FrxPDO
Class FrxPDO

Namespace

Drupal\forena\FrxPlugin\Driver

Code

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