You are here

function ARC_sparql_parser::parse_Query in Taxonomy import/export via XML 6.2

Same name and namespace in other branches
  1. 5.2 arc/ARC_sparql_parser.php \ARC_sparql_parser::parse_Query()
  2. 5 arc/ARC_sparql_parser.php \ARC_sparql_parser::parse_Query()
  3. 6 arc/ARC_sparql_parser.php \ARC_sparql_parser::parse_Query()
1 call to ARC_sparql_parser::parse_Query()
ARC_sparql_parser::parse in arc/ARC_sparql_parser.php

File

arc/ARC_sparql_parser.php, line 434

Class

ARC_sparql_parser

Code

function parse_Query() {
  $this->q = trim($this->q);
  $this
    ->parse_Prolog();
  if (preg_match("/^(SELECT|CONSTRUCT|DESCRIBE|ASK)/i", $this->q, $matches)) {
    $this->infos["query_type"] = strtolower($matches[1]);
    $this->q = trim(substr($this->q, strlen($matches[0])));
    $mthd = "parse_" . ucfirst(strtolower($matches[1])) . "Query";
    $this
      ->{$mthd}();
  }
  else {
    $this->errors[] = "missing or invalid query type in '" . $this->q . "'";
  }
}