public function Translator::addFunction in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/css-selector/XPath/Translator.php \Symfony\Component\CssSelector\XPath\Translator::addFunction()
Parameters
XPathExpr $xpath:
FunctionNode $function:
Return value
Throws
File
- vendor/
symfony/ css-selector/ XPath/ Translator.php, line 237
Class
- Translator
- XPath expression translator interface.
Namespace
Symfony\Component\CssSelector\XPathCode
public function addFunction(XPathExpr $xpath, FunctionNode $function) {
if (!isset($this->functionTranslators[$function
->getName()])) {
throw new ExpressionErrorException(sprintf('Function "%s" not supported.', $function
->getName()));
}
return call_user_func($this->functionTranslators[$function
->getName()], $xpath, $function);
}