コード例 #1
0
ファイル: XPathExpr.php プロジェクト: GromNaN/GitWikiApp
 /**
  * Joins this XPath expression with $other (another XPath expression) using
  * $combiner to join them.
  *
  * @param string    $combiner The combiner string.
  * @param XPathExpr $other    The other XPath expression to combine with
  *                            this one.
  */
 public function join($combiner, $other)
 {
     $prefix = (string) $this;
     $prefix .= $combiner;
     $path = $other->getPrefix() . $other->getPath();
     /* We don't need a star prefix if we are joining to this other
        prefix; so we'll get rid of it */
     if ($other->hasStarPrefix() && '*/' == $path) {
         $path = '';
     }
     $this->prefix = $prefix;
     $this->path = $path;
     $this->element = $other->getElement();
     $this->condition = $other->GetCondition();
 }