You are here

public function FrxSyntaxEngine::__construct in Forena Reports 7.3

Same name and namespace in other branches
  1. 6.2 FrxSyntaxEngine.inc \FrxSyntaxEngine::__construct()
  2. 6 FrxSyntaxEngine.inc \FrxSyntaxEngine::__construct()
  3. 7 FrxSyntaxEngine.inc \FrxSyntaxEngine::__construct()
  4. 7.2 FrxSyntaxEngine.inc \FrxSyntaxEngine::__construct()
  5. 7.4 FrxSyntaxEngine.inc \FrxSyntaxEngine::__construct()

Class for doing syntax replacements;

Parameters

$regexp:

$trim Trim characgers:

$data Data object to be used for resolving contexts.:

Return value

unknown_type

File

./FrxSyntaxEngine.inc, line 23
FrXSytnaxEngine defines how regular expression procesing/token substitution takes place. It includes support for passing in a formatter oobject that will escape strings properly before substituting them.

Class

FrxSyntaxEngine
@file FrXSytnaxEngine defines how regular expression procesing/token substitution takes place. It includes support for passing in a formatter oobject that will escape strings properly before substituting them.

Code

public function __construct($regexp, $trim, $formatter = NULL, $data = NULL) {
  $this->tpattern = $regexp;
  $this->trim_chars = $trim;
  if (is_object($formatter)) {
    $this->formatter = $formatter;
  }
  if ($data) {
    $this->data = $data;
  }
  else {
    $this->data = Frx::Data();
  }
}