You are here

protected function XPathQueryParser::handleQuote in Feeds XPath Parser 8

Handles quote pairs.

1 call to XPathQueryParser::handleQuote()
XPathQueryParser::start in lib/Drupal/feeds_xpathparser/XPathQueryParser.php
Begin parsing.

File

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

Class

XPathQueryParser
Pseudo-parser of XPath queries.

Namespace

Drupal\feeds_xpathparser

Code

protected function handleQuote($c) {
  if ($this->inQuotes && $c === $this->quoteChar) {
    $this->inQuotes = FALSE;
    $this->word .= $c;
    $this->output .= $this->word;
    $this->word = '';
  }
  elseif (!$this->inQuotes) {
    $this->inQuotes = TRUE;
    $this
      ->handleWord();
    $this->word = $c;
    $this->quoteChar = $c;
  }
  else {
    $this->word .= $c;
  }
}