You are here

public function XPathExpr::addNameTest in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/css-selector/XPath/XPathExpr.php \Symfony\Component\CssSelector\XPath\XPathExpr::addNameTest()

Return value

XPathExpr

File

vendor/symfony/css-selector/XPath/XPathExpr.php, line 87

Class

XPathExpr
XPath expression translator interface.

Namespace

Symfony\Component\CssSelector\XPath

Code

public function addNameTest() {
  if ('*' !== $this->element) {
    $this
      ->addCondition('name() = ' . Translator::getXpathLiteral($this->element));
    $this->element = '*';
  }
  return $this;
}