You are here

function FeedsXPathParserQueryParser::handle_word_boundary in Feeds XPath Parser 7

Same name and namespace in other branches
  1. 6 FeedsXPathParserQueryParser.inc \FeedsXPathParserQueryParser::handle_word_boundary()
1 call to FeedsXPathParserQueryParser::handle_word_boundary()
FeedsXPathParserQueryParser::start in ./FeedsXPathParserQueryParser.inc

File

./FeedsXPathParserQueryParser.inc, line 75
Pseudo-parser of XPath queries. When an XML document has a default namespace this gets called so that adding the __default__ namepace where appropriate. Aren't we nice?

Class

FeedsXPathParserQueryParser
@file Pseudo-parser of XPath queries. When an XML document has a default namespace this gets called so that adding the __default__ namepace where appropriate. Aren't we nice?

Code

function handle_word_boundary($c) {
  if (in_array($this->word, array(
    'div',
    'or',
    'and',
    'mod',
  )) && $this->prev_boundary == ' ' && $c == ' ') {
    $this->output .= $this->word;
  }
  else {
    $this
      ->handle_word($c);
  }
  $this->output .= $c;
  $this->word = '';
  $this->prev_boundary = $c;
}