public function AttributeMatchingExtension::translatePrefixMatch in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/css-selector/XPath/Extension/AttributeMatchingExtension.php \Symfony\Component\CssSelector\XPath\Extension\AttributeMatchingExtension::translatePrefixMatch()
Parameters
XPathExpr $xpath:
string $attribute:
string $value:
Return value
File
- vendor/
symfony/ css-selector/ XPath/ Extension/ AttributeMatchingExtension.php, line 108
Class
- AttributeMatchingExtension
- XPath expression translator attribute extension.
Namespace
Symfony\Component\CssSelector\XPath\ExtensionCode
public function translatePrefixMatch(XPathExpr $xpath, $attribute, $value) {
return $xpath
->addCondition($value ? sprintf('%1$s and starts-with(%1$s, %2$s)', $attribute, Translator::getXpathLiteral($value)) : '0');
}