You are here

protected function XPathQueryParser::start in Feeds XPath Parser 8

Begin parsing.

1 call to XPathQueryParser::start()
XPathQueryParser::getQuery in lib/Drupal/feeds_xpathparser/XPathQueryParser.php
Returns the modified XPath query.

File

lib/Drupal/feeds_xpathparser/XPathQueryParser.php, line 85
Contains \Drupal\feeds_xpathparser\XPathQueryParser.

Class

XPathQueryParser
Pseudo-parser of XPath queries.

Namespace

Drupal\feeds_xpathparser

Code

protected function start() {
  for ($i = 0; $i < drupal_strlen($this->query); $i++) {
    $this->i = $i;
    $c = drupal_substr($this->query, $i, 1);
    if ($c === '"' || $c === "'") {
      $this
        ->handleQuote($c);
      continue;
    }
    if ($this->inQuotes) {
      $this->word .= $c;
      continue;
    }
    if (in_array($c, $this->wordBoundaries)) {
      $this
        ->handleWordBoundary($c);
    }
    else {
      $this->word .= $c;
    }
  }
  $this
    ->handleWord();
}