You are here

public function FrxDrupal::__construct in Forena Reports 7.4

Same name and namespace in other branches
  1. 6.2 plugins/FrxDrupal.inc \FrxDrupal::__construct()
  2. 6 plugins/FrxDrupal.inc \FrxDrupal::__construct()
  3. 7 plugins/FrxDrupal.inc \FrxDrupal::__construct()
  4. 7.2 plugins/FrxDrupal.inc \FrxDrupal::__construct()
  5. 7.3 plugins/FrxDrupal.inc \FrxDrupal::__construct()

Object constructor

Parameters

array $conf Configuration key value pairs.:

string $repos_path Path to location of data block definitions:

string $name Name of data provider:

Overrides FrxDataSource::__construct

File

plugins/FrxDrupal.inc, line 23
Provides data blocks for native drupal connections using the default drupal connections.

Class

FrxDrupal
@file Provides data blocks for native drupal connections using the default drupal connections.

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 FrxSyntaxEngine(FRX_SQL_TOKEN, ':', $this);
}