function AttributeMatchingExtension::translateSubstringMatch
1 call to AttributeMatchingExtension::translateSubstringMatch()
- AttributeMatchingExtension::getAttributeMatchingTranslators in vendor/
symfony/ css-selector/ XPath/ Extension/ AttributeMatchingExtension.php - Returns attribute operation translators.
File
-
vendor/
symfony/ css-selector/ XPath/ Extension/ AttributeMatchingExtension.php, line 91
Class
- AttributeMatchingExtension
- XPath expression translator attribute extension.
Namespace
Symfony\Component\CssSelector\XPath\ExtensionCode
public function translateSubstringMatch(XPathExpr $xpath, string $attribute, ?string $value) : XPathExpr {
return $xpath->addCondition($value ? \sprintf('%1$s and contains(%1$s, %2$s)', $attribute, Translator::getXpathLiteral($value)) : '0');
}