You are here

public function FrxDrupal::__construct in Forena Reports 7.5

Object constructor

Parameters

unknown_type $uri Database connection string.:

string $repos_path Path to location of data block definitions:

Overrides FrxDataSource::__construct

File

src/Driver/FrxDrupal.php, line 25
Provides data blocks for native drupal connections using the default drupal connections.

Class

FrxDrupal

Namespace

Drupal\forena\Driver

Code

public function __construct($conf, $repos_path, $name) {
  parent::__construct($conf, $repos_path, $name);
  if (@$conf['database'] && @$conf['database'] != 'default') {
    $this->database = $conf['database'];
  }
  $target = $this->database ? $this->database : 'default';
  $this->db_type = \Database::getConnection($target)
    ->databaseType();

  // Set up the stuff required to translate.
  $this->te = new SQLReplacer($this);
}